Lines Matching defs:win

111  * successful, new_win, vout->win, and crop are updated.
116 struct v4l2_window *win, struct v4l2_framebuffer *fbuf,
126 win->w = new_win->w;
127 win->field = new_win->field;
128 win->chromakey = new_win->chromakey;
133 if ((crop->height/win->w.height) >= 2)
134 crop->height = win->w.height * 2;
136 if ((crop->width/win->w.width) >= 2)
137 crop->width = win->w.width * 2;
144 if (crop->height != win->w.height)
149 if ((crop->height/win->w.height) >= 4)
150 crop->height = win->w.height * 4;
152 if ((crop->width/win->w.width) >= 4)
153 crop->width = win->w.width * 4;
160 * the nearest supported configuration. The image render window in win will
165 * and win are updated.
170 struct v4l2_rect *crop, struct v4l2_window *win,
204 if (try_crop.height != win->w.height) {
213 vresize = (1024 * try_crop.height) / win->w.height;
219 win->w.height = ((1024 * try_crop.height) / vresize) & ~1;
220 if (win->w.height == 0)
221 win->w.height = 2;
222 if (win->w.height + win->w.top > fbuf->fmt.height) {
227 win->w.height = (fbuf->fmt.height - win->w.top) & ~1;
232 hresize = (1024 * try_crop.width) / win->w.width;
238 win->w.width = ((1024 * try_crop.width) / hresize) & ~1;
239 if (win->w.width == 0)
240 win->w.width = 2;
241 if (win->w.width + win->w.left > fbuf->fmt.width) {
246 win->w.width = (fbuf->fmt.width - win->w.left) & ~1;
251 if ((try_crop.height/win->w.height) >= 2)
252 try_crop.height = win->w.height * 2;
254 if ((try_crop.width/win->w.width) >= 2)
255 try_crop.width = win->w.width * 2;
262 if (try_crop.height != win->w.height)
266 if ((try_crop.height/win->w.height) >= 4)
267 try_crop.height = win->w.height * 4;
269 if ((try_crop.width/win->w.width) >= 4)
270 try_crop.width = win->w.width * 4;
278 /* Given a new format in pix and fbuf, crop and win
281 * crop window is centered in the image. win is initialized to
287 struct v4l2_window *win)
294 /* win defines the preview target window on the display */
295 win->w.width = crop->width;
296 win->w.height = crop->height;
297 win->w.left = ((fbuf->fmt.width - win->w.width) >> 1) & ~1;
298 win->w.top = ((fbuf->fmt.height - win->w.height) >> 1) & ~1;