Lines Matching refs:try_crop
165 struct v4l2_rect try_crop;
169 try_crop = *new_crop;
172 if (try_crop.left < 0) {
173 try_crop.width += try_crop.left;
174 try_crop.left = 0;
176 if (try_crop.top < 0) {
177 try_crop.height += try_crop.top;
178 try_crop.top = 0;
180 try_crop.width = (try_crop.width < pix->width) ?
181 try_crop.width : pix->width;
182 try_crop.height = (try_crop.height < pix->height) ?
183 try_crop.height : pix->height;
184 if (try_crop.left + try_crop.width > pix->width)
185 try_crop.width = pix->width - try_crop.left;
186 if (try_crop.top + try_crop.height > pix->height)
187 try_crop.height = pix->height - try_crop.top;
189 try_crop.width &= ~1;
190 try_crop.height &= ~1;
192 if (try_crop.width <= 0 || try_crop.height <= 0)
200 if (try_crop.width > 768)
201 try_crop.width = 768;
211 win->w.height = ((1024 * try_crop.height) / vresize) & ~1;
220 if (try_crop.height == 0)
221 try_crop.height = 2;
230 win->w.width = ((1024 * try_crop.width) / hresize) & ~1;
239 if (try_crop.width == 0)
240 try_crop.width = 2;
243 if ((try_crop.height/win->w.height) >= 2)
244 try_crop.height = win->w.height * 2;
246 if ((try_crop.width/win->w.width) >= 2)
247 try_crop.width = win->w.width * 2;
249 if (try_crop.width > 768) {
254 if (try_crop.height != win->w.height)
255 try_crop.width = 768;
258 if ((try_crop.height/win->w.height) >= 4)
259 try_crop.height = win->w.height * 4;
261 if ((try_crop.width/win->w.width) >= 4)
262 try_crop.width = win->w.width * 4;
265 *crop = try_crop;