Lines Matching refs:tpg
223 static void *plane_vaddr(struct tpg_data *tpg, struct vivid_buffer *buf, in plane_vaddr() argument
229 if (p == 0 || tpg_g_buffers(tpg) > 1) in plane_vaddr()
233 vbuf += bpl[i] * h / tpg->vdownsampling[i]; in plane_vaddr()
241 struct tpg_data *tpg = &dev->tpg; in vivid_copy_buffer() local
244 unsigned twopixsize = tpg_g_twopixelsize(tpg, p); in vivid_copy_buffer()
245 unsigned img_width = tpg_hdiv(tpg, p, dev->compose_cap.width); in vivid_copy_buffer()
247 unsigned stride_cap = tpg->bytesperline[p]; in vivid_copy_buffer()
250 unsigned hmax = (img_height * tpg->perc_fill) / 100; in vivid_copy_buffer()
264 unsigned vid_cap_left = tpg_hdiv(tpg, p, dev->loop_vid_cap.left); in vivid_copy_buffer()
279 voutbuf = plane_vaddr(tpg, vid_out_buf, p, in vivid_copy_buffer()
283 voutbuf += tpg_hdiv(tpg, p, dev->loop_vid_out.left) + in vivid_copy_buffer()
285 vcapbuf += tpg_hdiv(tpg, p, dev->compose_cap.left) + in vivid_copy_buffer()
294 memcpy(vcapbuf, tpg->black_line[p], img_width); in vivid_copy_buffer()
309 vid_cap_right = tpg_hdiv(tpg, p, dev->loop_vid_cap.left + dev->loop_vid_cap.width); in vivid_copy_buffer()
325 memcpy(vcapbuf, tpg->black_line[p], img_width); in vivid_copy_buffer()
331 memcpy(vcapbuf, tpg->black_line[p], vid_cap_left); in vivid_copy_buffer()
335 memcpy(vcapbuf + vid_cap_right, tpg->black_line[p], in vivid_copy_buffer()
341 tpg_hdiv(tpg, p, dev->loop_vid_cap.width)); in vivid_copy_buffer()
346 tpg_hdiv(tpg, p, dev->loop_vid_cap.width)); in vivid_copy_buffer()
351 tpg_hdiv(tpg, p, dev->loop_vid_out.width), in vivid_copy_buffer()
352 tpg_hdiv(tpg, p, dev->loop_vid_cap.width), in vivid_copy_buffer()
353 tpg_g_twopixelsize(tpg, p)); in vivid_copy_buffer()
366 tpg_g_twopixelsize(tpg, p)); in vivid_copy_buffer()
377 tpg_g_twopixelsize(tpg, p)); in vivid_copy_buffer()
381 tpg_hdiv(tpg, p, dev->loop_vid_cap.width)); in vivid_copy_buffer()
403 memcpy(vcapbuf, tpg->contrast_line[p], img_width); in vivid_copy_buffer()
409 struct tpg_data *tpg = &dev->tpg; in vivid_fillbuff() local
448 tpg_s_field(tpg, buf->vb.field, in vivid_fillbuff()
450 tpg_s_perc_fill_blank(tpg, dev->must_blank[buf->vb.vb2_buf.index]); in vivid_fillbuff()
454 for (p = 0; p < tpg_g_planes(tpg); p++) { in vivid_fillbuff()
455 void *vbuf = plane_vaddr(tpg, buf, p, in vivid_fillbuff()
456 tpg->bytesperline, tpg->buf_height); in vivid_fillbuff()
463 if (p < tpg_g_buffers(tpg) && dev->fmt_cap->data_offset[p]) { in vivid_fillbuff()
468 tpg_calc_text_basep(tpg, basep, p, vbuf); in vivid_fillbuff()
470 tpg_fill_plane_buffer(tpg, vivid_get_std_cap(dev), in vivid_fillbuff()
492 tpg_gen_text(tpg, basep, line++ * line_height, 16, str); in vivid_fillbuff()
497 tpg_gen_text(tpg, basep, line++ * line_height, 16, str); in vivid_fillbuff()
507 tpg_gen_text(tpg, basep, line++ * line_height, 16, str); in vivid_fillbuff()
512 tpg_gen_text(tpg, basep, line++ * line_height, 16, str); in vivid_fillbuff()
518 tpg_gen_text(tpg, basep, line++ * line_height, 16, str); in vivid_fillbuff()
525 tpg_gen_text(tpg, basep, line++ * line_height, 16, str); in vivid_fillbuff()
530 tpg_gen_text(tpg, basep, line++ * line_height, 16, str); in vivid_fillbuff()
535 tpg_gen_text(tpg, basep, line++ * line_height, 16, str); in vivid_fillbuff()
539 tpg_gen_text(tpg, basep, line++ * line_height, 16, str); in vivid_fillbuff()
545 tpg_gen_text(tpg, basep, line++ * line_height, in vivid_fillbuff()
597 struct tpg_data *tpg = &dev->tpg; in vivid_overlay() local
598 unsigned pixsize = tpg_g_twopixelsize(tpg, 0) / 2; in vivid_overlay()
603 unsigned stride = tpg->bytesperline[0]; in vivid_overlay()
690 tpg_update_mv_count(&dev->tpg, in vivid_thread_vid_cap_tick()
789 tpg_update_mv_count(&dev->tpg, dev->field_cap == V4L2_FIELD_NONE || in vivid_thread_vid_cap_tick()
930 tpg_init_mv_count(&dev->tpg); in vivid_start_generating_vid_cap()