Lines Matching refs:try_crop

173 	struct v4l2_rect try_crop;  in omap_vout_new_crop()  local
177 try_crop = *new_crop; in omap_vout_new_crop()
180 if (try_crop.left < 0) { in omap_vout_new_crop()
181 try_crop.width += try_crop.left; in omap_vout_new_crop()
182 try_crop.left = 0; in omap_vout_new_crop()
184 if (try_crop.top < 0) { in omap_vout_new_crop()
185 try_crop.height += try_crop.top; in omap_vout_new_crop()
186 try_crop.top = 0; in omap_vout_new_crop()
188 try_crop.width = (try_crop.width < pix->width) ? in omap_vout_new_crop()
189 try_crop.width : pix->width; in omap_vout_new_crop()
190 try_crop.height = (try_crop.height < pix->height) ? in omap_vout_new_crop()
191 try_crop.height : pix->height; in omap_vout_new_crop()
192 if (try_crop.left + try_crop.width > pix->width) in omap_vout_new_crop()
193 try_crop.width = pix->width - try_crop.left; in omap_vout_new_crop()
194 if (try_crop.top + try_crop.height > pix->height) in omap_vout_new_crop()
195 try_crop.height = pix->height - try_crop.top; in omap_vout_new_crop()
197 try_crop.width &= ~1; in omap_vout_new_crop()
198 try_crop.height &= ~1; in omap_vout_new_crop()
200 if (try_crop.width <= 0 || try_crop.height <= 0) in omap_vout_new_crop()
204 if (try_crop.height != win->w.height) { in omap_vout_new_crop()
208 if (try_crop.width > 768) in omap_vout_new_crop()
209 try_crop.width = 768; in omap_vout_new_crop()
213 vresize = (1024 * try_crop.height) / win->w.height; in omap_vout_new_crop()
219 win->w.height = ((1024 * try_crop.height) / vresize) & ~1; in omap_vout_new_crop()
228 if (try_crop.height == 0) in omap_vout_new_crop()
229 try_crop.height = 2; in omap_vout_new_crop()
232 hresize = (1024 * try_crop.width) / win->w.width; in omap_vout_new_crop()
238 win->w.width = ((1024 * try_crop.width) / hresize) & ~1; in omap_vout_new_crop()
247 if (try_crop.width == 0) in omap_vout_new_crop()
248 try_crop.width = 2; in omap_vout_new_crop()
251 if ((try_crop.height/win->w.height) >= 2) in omap_vout_new_crop()
252 try_crop.height = win->w.height * 2; in omap_vout_new_crop()
254 if ((try_crop.width/win->w.width) >= 2) in omap_vout_new_crop()
255 try_crop.width = win->w.width * 2; in omap_vout_new_crop()
257 if (try_crop.width > 768) { in omap_vout_new_crop()
262 if (try_crop.height != win->w.height) in omap_vout_new_crop()
263 try_crop.width = 768; in omap_vout_new_crop()
266 if ((try_crop.height/win->w.height) >= 4) in omap_vout_new_crop()
267 try_crop.height = win->w.height * 4; in omap_vout_new_crop()
269 if ((try_crop.width/win->w.width) >= 4) in omap_vout_new_crop()
270 try_crop.width = win->w.width * 4; in omap_vout_new_crop()
273 *crop = try_crop; in omap_vout_new_crop()