Lines Matching full:f
16 struct v4l2_pix_format *f = &dev->tch_format; in touch_cap_queue_setup() local
17 unsigned int size = f->sizeimage; in touch_cap_queue_setup()
36 struct v4l2_pix_format *f = &dev->tch_format; in touch_cap_buf_prepare() local
37 unsigned int size = f->sizeimage; in touch_cap_buf_prepare()
120 int vivid_enum_fmt_tch(struct file *file, void *priv, struct v4l2_fmtdesc *f) in vivid_enum_fmt_tch() argument
122 if (f->index) in vivid_enum_fmt_tch()
125 f->pixelformat = V4L2_TCH_FMT_DELTA_TD16; in vivid_enum_fmt_tch()
129 int vivid_g_fmt_tch(struct file *file, void *priv, struct v4l2_format *f) in vivid_g_fmt_tch() argument
135 f->fmt.pix = dev->tch_format; in vivid_g_fmt_tch()
139 int vivid_g_fmt_tch_mplane(struct file *file, void *priv, struct v4l2_format *f) in vivid_g_fmt_tch_mplane() argument
148 fmt_sp2mp(&sp_fmt, f); in vivid_g_fmt_tch_mplane()
187 struct v4l2_pix_format *f = &dev->tch_format; in vivid_set_touch() local
192 f->pixelformat = V4L2_TCH_FMT_DELTA_TD16; in vivid_set_touch()
193 f->width = VIVID_TCH_WIDTH; in vivid_set_touch()
194 f->height = VIVID_TCH_HEIGHT; in vivid_set_touch()
195 f->field = V4L2_FIELD_NONE; in vivid_set_touch()
196 f->colorspace = V4L2_COLORSPACE_RAW; in vivid_set_touch()
197 f->bytesperline = f->width * sizeof(s16); in vivid_set_touch()
198 f->sizeimage = f->width * f->height * sizeof(s16); in vivid_set_touch()
227 static void vivid_tch_buf_set(struct v4l2_pix_format *f, in vivid_tch_buf_set() argument
231 unsigned int x = index % f->width; in vivid_tch_buf_set()
232 unsigned int y = index / f->width; in vivid_tch_buf_set()
239 if (x < f->width - 1) in vivid_tch_buf_set()
242 tch_buf[index - f->width] = offset + get_random_pressure(); in vivid_tch_buf_set()
243 if (y < f->height - 1) in vivid_tch_buf_set()
244 tch_buf[index + f->width] = offset + get_random_pressure(); in vivid_tch_buf_set()
247 tch_buf[index - 1 - f->width] = offset + get_random_pressure(); in vivid_tch_buf_set()
248 if (x < f->width - 1 && y) in vivid_tch_buf_set()
249 tch_buf[index + 1 - f->width] = offset + get_random_pressure(); in vivid_tch_buf_set()
250 if (x && y < f->height - 1) in vivid_tch_buf_set()
251 tch_buf[index - 1 + f->width] = offset + get_random_pressure(); in vivid_tch_buf_set()
252 if (x < f->width - 1 && y < f->height - 1) in vivid_tch_buf_set()
253 tch_buf[index + 1 + f->width] = offset + get_random_pressure(); in vivid_tch_buf_set()
258 struct v4l2_pix_format *f = &dev->tch_format; in vivid_fillbuff_tch() local
259 int size = f->width * f->height; in vivid_fillbuff_tch()
281 vivid_tch_buf_set(f, tch_buf, rand % size); in vivid_fillbuff_tch()
285 vivid_tch_buf_set(f, tch_buf, rand % size); in vivid_fillbuff_tch()
289 vivid_tch_buf_set(f, tch_buf, rand % size); in vivid_fillbuff_tch()
292 vivid_tch_buf_set(f, tch_buf, in vivid_fillbuff_tch()
293 (rand % f->height) * f->width + in vivid_fillbuff_tch()
295 (f->width / TCH_PATTERN_COUNT)); in vivid_fillbuff_tch()
298 x = f->width / 2; in vivid_fillbuff_tch()
299 y = f->height / 2; in vivid_fillbuff_tch()
304 vivid_tch_buf_set(f, tch_buf, in vivid_fillbuff_tch()
305 (x - offset_x) + f->width * (y - offset_y)); in vivid_fillbuff_tch()
306 vivid_tch_buf_set(f, tch_buf, in vivid_fillbuff_tch()
307 (x + offset_x) + f->width * (y + offset_y)); in vivid_fillbuff_tch()
310 x = f->width / 2; in vivid_fillbuff_tch()
311 y = f->height / 2; in vivid_fillbuff_tch()
314 vivid_tch_buf_set(f, tch_buf, in vivid_fillbuff_tch()
315 (x - offset_x) + f->width * (y - offset_y)); in vivid_fillbuff_tch()
316 vivid_tch_buf_set(f, tch_buf, in vivid_fillbuff_tch()
317 (x + offset_x) + f->width * (y + offset_y)); in vivid_fillbuff_tch()
320 for (x = 0; x < f->width; x++) in vivid_fillbuff_tch()
321 for (y = f->height / 2; y < f->height; y++) in vivid_fillbuff_tch()
322 tch_buf[x + f->width * y] = VIVID_MIN_PRESSURE + in vivid_fillbuff_tch()
329 ystart = (y * f->height) / 4 + f->height / 8; in vivid_fillbuff_tch()
330 xstart = (x * f->width) / 4 + f->width / 8; in vivid_fillbuff_tch()
331 vivid_tch_buf_set(f, tch_buf, in vivid_fillbuff_tch()
332 ystart * f->width + xstart); in vivid_fillbuff_tch()