Lines Matching full:f

17 	struct v4l2_pix_format *f = &dev->tch_format;  in touch_cap_queue_setup()  local
18 unsigned int size = f->sizeimage; in touch_cap_queue_setup()
37 struct v4l2_pix_format *f = &dev->tch_format; in touch_cap_buf_prepare() local
38 unsigned int size = f->sizeimage; in touch_cap_buf_prepare()
121 int vivid_enum_fmt_tch(struct file *file, void *priv, struct v4l2_fmtdesc *f) in vivid_enum_fmt_tch() argument
123 if (f->index) in vivid_enum_fmt_tch()
126 f->pixelformat = V4L2_TCH_FMT_DELTA_TD16; in vivid_enum_fmt_tch()
130 int vivid_g_fmt_tch(struct file *file, void *priv, struct v4l2_format *f) in vivid_g_fmt_tch() argument
136 f->fmt.pix = dev->tch_format; in vivid_g_fmt_tch()
140 int vivid_g_fmt_tch_mplane(struct file *file, void *priv, struct v4l2_format *f) in vivid_g_fmt_tch_mplane() argument
149 fmt_sp2mp(&sp_fmt, f); in vivid_g_fmt_tch_mplane()
188 struct v4l2_pix_format *f = &dev->tch_format; in vivid_set_touch() local
193 f->pixelformat = V4L2_TCH_FMT_DELTA_TD16; in vivid_set_touch()
194 f->width = VIVID_TCH_WIDTH; in vivid_set_touch()
195 f->height = VIVID_TCH_HEIGHT; in vivid_set_touch()
196 f->field = V4L2_FIELD_NONE; in vivid_set_touch()
197 f->colorspace = V4L2_COLORSPACE_RAW; in vivid_set_touch()
198 f->bytesperline = f->width * sizeof(s16); in vivid_set_touch()
199 f->sizeimage = f->width * f->height * sizeof(s16); in vivid_set_touch()
228 static void vivid_tch_buf_set(struct v4l2_pix_format *f, in vivid_tch_buf_set() argument
232 unsigned int x = index % f->width; in vivid_tch_buf_set()
233 unsigned int y = index / f->width; in vivid_tch_buf_set()
240 if (x < f->width - 1) in vivid_tch_buf_set()
243 tch_buf[index - f->width] = offset + get_random_pressure(); in vivid_tch_buf_set()
244 if (y < f->height - 1) in vivid_tch_buf_set()
245 tch_buf[index + f->width] = offset + get_random_pressure(); in vivid_tch_buf_set()
248 tch_buf[index - 1 - f->width] = offset + get_random_pressure(); in vivid_tch_buf_set()
249 if (x < f->width - 1 && y) in vivid_tch_buf_set()
250 tch_buf[index + 1 - f->width] = offset + get_random_pressure(); in vivid_tch_buf_set()
251 if (x && y < f->height - 1) in vivid_tch_buf_set()
252 tch_buf[index - 1 + f->width] = offset + get_random_pressure(); in vivid_tch_buf_set()
253 if (x < f->width - 1 && y < f->height - 1) in vivid_tch_buf_set()
254 tch_buf[index + 1 + f->width] = offset + get_random_pressure(); in vivid_tch_buf_set()
259 struct v4l2_pix_format *f = &dev->tch_format; in vivid_fillbuff_tch() local
260 int size = f->width * f->height; in vivid_fillbuff_tch()
282 vivid_tch_buf_set(f, tch_buf, rand % size); in vivid_fillbuff_tch()
286 vivid_tch_buf_set(f, tch_buf, rand % size); in vivid_fillbuff_tch()
290 vivid_tch_buf_set(f, tch_buf, rand % size); in vivid_fillbuff_tch()
293 vivid_tch_buf_set(f, tch_buf, in vivid_fillbuff_tch()
294 (rand % f->height) * f->width + in vivid_fillbuff_tch()
296 (f->width / TCH_PATTERN_COUNT)); in vivid_fillbuff_tch()
299 x = f->width / 2; in vivid_fillbuff_tch()
300 y = f->height / 2; in vivid_fillbuff_tch()
305 vivid_tch_buf_set(f, tch_buf, in vivid_fillbuff_tch()
306 (x - offset_x) + f->width * (y - offset_y)); in vivid_fillbuff_tch()
307 vivid_tch_buf_set(f, tch_buf, in vivid_fillbuff_tch()
308 (x + offset_x) + f->width * (y + offset_y)); in vivid_fillbuff_tch()
311 x = f->width / 2; in vivid_fillbuff_tch()
312 y = f->height / 2; in vivid_fillbuff_tch()
315 vivid_tch_buf_set(f, tch_buf, in vivid_fillbuff_tch()
316 (x - offset_x) + f->width * (y - offset_y)); in vivid_fillbuff_tch()
317 vivid_tch_buf_set(f, tch_buf, in vivid_fillbuff_tch()
318 (x + offset_x) + f->width * (y + offset_y)); in vivid_fillbuff_tch()
321 for (x = 0; x < f->width; x++) in vivid_fillbuff_tch()
322 for (y = f->height / 2; y < f->height; y++) in vivid_fillbuff_tch()
323 tch_buf[x + f->width * y] = VIVID_MIN_PRESSURE + in vivid_fillbuff_tch()
330 ystart = (y * f->height) / 4 + f->height / 8; in vivid_fillbuff_tch()
331 xstart = (x * f->width) / 4 + f->width / 8; in vivid_fillbuff_tch()
332 vivid_tch_buf_set(f, tch_buf, in vivid_fillbuff_tch()
333 ystart * f->width + xstart); in vivid_fillbuff_tch()