Lines Matching defs:vb

381 static inline void store_byte(struct go7007_buffer *vb, u8 byte)
383 if (vb && vb->vb.vb2_buf.planes[0].bytesused < GO7007_BUF_SIZE) {
384 u8 *ptr = vb2_plane_vaddr(&vb->vb.vb2_buf, 0);
386 ptr[vb->vb.vb2_buf.planes[0].bytesused++] = byte;
390 static void go7007_set_motion_regions(struct go7007 *go, struct go7007_buffer *vb,
398 .frame_sequence = vb->vb.sequence,
412 static void go7007_motion_regions(struct go7007 *go, struct go7007_buffer *vb)
414 u32 *bytesused = &vb->vb.vb2_buf.planes[0].bytesused;
422 store_byte(vb, go->active_map[i]);
435 go7007_set_motion_regions(go, vb, motion_regions);
441 static struct go7007_buffer *frame_boundary(struct go7007 *go, struct go7007_buffer *vb)
447 if (vb == NULL) {
450 vb = go->active_buf =
454 return vb;
456 bytesused = &vb->vb.vb2_buf.planes[0].bytesused;
458 vb->vb.sequence = go->next_seq++;
459 if (vb->modet_active && *bytesused + 216 < GO7007_BUF_SIZE)
460 go7007_motion_regions(go, vb);
462 go7007_set_motion_regions(go, vb, 0);
464 vb->vb.vb2_buf.timestamp = ktime_get_ns();
465 vb_tmp = vb;
467 list_del(&vb->list);
469 vb = NULL;
471 vb = list_first_entry(&go->vidq_active,
473 go->active_buf = vb;
475 vb2_buffer_done(&vb_tmp->vb.vb2_buf, VB2_BUF_STATE_DONE);
476 return vb;
500 struct go7007_buffer *vb = go->active_buf;
518 if (vb && vb->vb.vb2_buf.planes[0].bytesused >=
521 vb2_set_plane_payload(&vb->vb.vb2_buf, 0, 0);
522 vb->frame_offset = 0;
523 vb->modet_active = 0;
524 vb = go->active_buf = NULL;
537 store_byte(vb, buf[i]);
547 store_byte(vb, 0x00);
551 store_byte(vb, 0x00);
552 store_byte(vb, buf[i]);
560 store_byte(vb, 0x00);
567 store_byte(vb, 0x00);
568 store_byte(vb, 0x00);
572 store_byte(vb, 0x00);
573 store_byte(vb, 0x00);
574 store_byte(vb, buf[i]);
582 store_byte(vb, 0x00);
583 store_byte(vb, 0x00);
584 store_byte(vb, 0x01);
585 store_byte(vb, 0xF8);
597 if (vb == NULL || go->seen_frame)
598 vb = frame_boundary(go, vb);
600 if (vb && go->seen_frame)
601 vb->frame_offset =
602 vb->vb.vb2_buf.planes[0].bytesused;
621 store_byte(vb, 0x00);
622 store_byte(vb, 0x00);
623 store_byte(vb, 0x01);
627 store_byte(vb, 0x00);
628 store_byte(vb, 0x00);
629 store_byte(vb, 0x01);
630 store_byte(vb, buf[i]);
638 store_byte(vb, 0xFF);
642 store_byte(vb, 0xFF);
647 vb = frame_boundary(go, vb);
650 store_byte(vb, 0xFF);
651 store_byte(vb, buf[i]);
674 } else if (go->parse_length == 207 && vb) {
675 vb->modet_active = buf[i];