Lines Matching refs:win

107  * successful, new_win, vout->win, and crop are updated.
112 struct v4l2_window *win, struct v4l2_framebuffer *fbuf,
122 win->w = new_win->w;
123 win->field = new_win->field;
124 win->chromakey = new_win->chromakey;
129 if ((crop->height/win->w.height) >= 2)
130 crop->height = win->w.height * 2;
132 if ((crop->width/win->w.width) >= 2)
133 crop->width = win->w.width * 2;
140 if (crop->height != win->w.height)
145 if ((crop->height/win->w.height) >= 4)
146 crop->height = win->w.height * 4;
148 if ((crop->width/win->w.width) >= 4)
149 crop->width = win->w.width * 4;
156 * the nearest supported configuration. The image render window in win will
161 * and win are updated.
166 struct v4l2_rect *crop, struct v4l2_window *win,
200 if (try_crop.height != win->w.height) {
209 vresize = (1024 * try_crop.height) / win->w.height;
215 win->w.height = ((1024 * try_crop.height) / vresize) & ~1;
216 if (win->w.height == 0)
217 win->w.height = 2;
218 if (win->w.height + win->w.top > fbuf->fmt.height) {
223 win->w.height = (fbuf->fmt.height - win->w.top) & ~1;
228 hresize = (1024 * try_crop.width) / win->w.width;
234 win->w.width = ((1024 * try_crop.width) / hresize) & ~1;
235 if (win->w.width == 0)
236 win->w.width = 2;
237 if (win->w.width + win->w.left > fbuf->fmt.width) {
242 win->w.width = (fbuf->fmt.width - win->w.left) & ~1;
247 if ((try_crop.height/win->w.height) >= 2)
248 try_crop.height = win->w.height * 2;
250 if ((try_crop.width/win->w.width) >= 2)
251 try_crop.width = win->w.width * 2;
258 if (try_crop.height != win->w.height)
262 if ((try_crop.height/win->w.height) >= 4)
263 try_crop.height = win->w.height * 4;
265 if ((try_crop.width/win->w.width) >= 4)
266 try_crop.width = win->w.width * 4;
274 /* Given a new format in pix and fbuf, crop and win
277 * crop window is centered in the image. win is initialized to
283 struct v4l2_window *win)
290 /* win defines the preview target window on the display */
291 win->w.width = crop->width;
292 win->w.height = crop->height;
293 win->w.left = ((fbuf->fmt.width - win->w.width) >> 1) & ~1;
294 win->w.top = ((fbuf->fmt.height - win->w.height) >> 1) & ~1;