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()
33 struct v4l2_pix_format *f = &dev->tch_format; in touch_cap_buf_prepare() local
34 unsigned int size = f->sizeimage; in touch_cap_buf_prepare()
115 int vivid_enum_fmt_tch(struct file *file, void *priv, struct v4l2_fmtdesc *f) in vivid_enum_fmt_tch() argument
117 if (f->index) in vivid_enum_fmt_tch()
120 f->pixelformat = V4L2_TCH_FMT_DELTA_TD16; in vivid_enum_fmt_tch()
124 int vivid_g_fmt_tch(struct file *file, void *priv, struct v4l2_format *f) in vivid_g_fmt_tch() argument
130 f->fmt.pix = dev->tch_format; in vivid_g_fmt_tch()
134 int vivid_g_fmt_tch_mplane(struct file *file, void *priv, struct v4l2_format *f) in vivid_g_fmt_tch_mplane() argument
143 fmt_sp2mp(&sp_fmt, f); in vivid_g_fmt_tch_mplane()
182 struct v4l2_pix_format *f = &dev->tch_format; in vivid_set_touch() local
187 f->pixelformat = V4L2_TCH_FMT_DELTA_TD16; in vivid_set_touch()
188 f->width = VIVID_TCH_WIDTH; in vivid_set_touch()
189 f->height = VIVID_TCH_HEIGHT; in vivid_set_touch()
190 f->field = V4L2_FIELD_NONE; in vivid_set_touch()
191 f->colorspace = V4L2_COLORSPACE_RAW; in vivid_set_touch()
192 f->bytesperline = f->width * sizeof(s16); in vivid_set_touch()
193 f->sizeimage = f->width * f->height * sizeof(s16); in vivid_set_touch()
222 static void vivid_tch_buf_set(struct v4l2_pix_format *f, in vivid_tch_buf_set() argument
226 unsigned int x = index % f->width; in vivid_tch_buf_set()
227 unsigned int y = index / f->width; in vivid_tch_buf_set()
234 if (x < f->width - 1) in vivid_tch_buf_set()
237 tch_buf[index - f->width] = offset + get_random_pressure(); in vivid_tch_buf_set()
238 if (y < f->height - 1) in vivid_tch_buf_set()
239 tch_buf[index + f->width] = offset + get_random_pressure(); in vivid_tch_buf_set()
242 tch_buf[index - 1 - f->width] = offset + get_random_pressure(); in vivid_tch_buf_set()
243 if (x < f->width - 1 && y) in vivid_tch_buf_set()
244 tch_buf[index + 1 - f->width] = offset + get_random_pressure(); in vivid_tch_buf_set()
245 if (x && y < f->height - 1) in vivid_tch_buf_set()
246 tch_buf[index - 1 + f->width] = offset + get_random_pressure(); in vivid_tch_buf_set()
247 if (x < f->width - 1 && y < f->height - 1) in vivid_tch_buf_set()
248 tch_buf[index + 1 + f->width] = offset + get_random_pressure(); in vivid_tch_buf_set()
253 struct v4l2_pix_format *f = &dev->tch_format; in vivid_fillbuff_tch() local
254 int size = f->width * f->height; in vivid_fillbuff_tch()
276 vivid_tch_buf_set(f, tch_buf, rand % size); in vivid_fillbuff_tch()
280 vivid_tch_buf_set(f, tch_buf, rand % size); in vivid_fillbuff_tch()
284 vivid_tch_buf_set(f, tch_buf, rand % size); in vivid_fillbuff_tch()
287 vivid_tch_buf_set(f, tch_buf, in vivid_fillbuff_tch()
288 (rand % f->height) * f->width + in vivid_fillbuff_tch()
290 (f->width / TCH_PATTERN_COUNT)); in vivid_fillbuff_tch()
293 x = f->width / 2; in vivid_fillbuff_tch()
294 y = f->height / 2; in vivid_fillbuff_tch()
299 vivid_tch_buf_set(f, tch_buf, in vivid_fillbuff_tch()
300 (x - offset_x) + f->width * (y - offset_y)); in vivid_fillbuff_tch()
301 vivid_tch_buf_set(f, tch_buf, in vivid_fillbuff_tch()
302 (x + offset_x) + f->width * (y + offset_y)); in vivid_fillbuff_tch()
305 x = f->width / 2; in vivid_fillbuff_tch()
306 y = f->height / 2; in vivid_fillbuff_tch()
309 vivid_tch_buf_set(f, tch_buf, in vivid_fillbuff_tch()
310 (x - offset_x) + f->width * (y - offset_y)); in vivid_fillbuff_tch()
311 vivid_tch_buf_set(f, tch_buf, in vivid_fillbuff_tch()
312 (x + offset_x) + f->width * (y + offset_y)); in vivid_fillbuff_tch()
315 for (x = 0; x < f->width; x++) in vivid_fillbuff_tch()
316 for (y = f->height / 2; y < f->height; y++) in vivid_fillbuff_tch()
317 tch_buf[x + f->width * y] = VIVID_MIN_PRESSURE + in vivid_fillbuff_tch()
324 ystart = (y * f->height) / 4 + f->height / 8; in vivid_fillbuff_tch()
325 xstart = (x * f->width) / 4 + f->width / 8; in vivid_fillbuff_tch()
326 vivid_tch_buf_set(f, tch_buf, in vivid_fillbuff_tch()
327 ystart * f->width + xstart); in vivid_fillbuff_tch()