Lines Matching refs:rect
201 struct v4l2_rect rect; /* sensor cropping window */ member
441 a->c = priv->rect; in ov6650_g_crop()
450 struct v4l2_rect rect = a->c; in ov6650_s_crop() local
456 rect.left = ALIGN(rect.left, 2); in ov6650_s_crop()
457 rect.width = ALIGN(rect.width, 2); in ov6650_s_crop()
458 rect.top = ALIGN(rect.top, 2); in ov6650_s_crop()
459 rect.height = ALIGN(rect.height, 2); in ov6650_s_crop()
460 soc_camera_limit_side(&rect.left, &rect.width, in ov6650_s_crop()
462 soc_camera_limit_side(&rect.top, &rect.height, in ov6650_s_crop()
465 ret = ov6650_reg_write(client, REG_HSTRT, rect.left >> 1); in ov6650_s_crop()
467 priv->rect.left = rect.left; in ov6650_s_crop()
469 (rect.left + rect.width) >> 1); in ov6650_s_crop()
472 priv->rect.width = rect.width; in ov6650_s_crop()
473 ret = ov6650_reg_write(client, REG_VSTRT, rect.top >> 1); in ov6650_s_crop()
476 priv->rect.top = rect.top; in ov6650_s_crop()
478 (rect.top + rect.height) >> 1); in ov6650_s_crop()
481 priv->rect.height = rect.height; in ov6650_s_crop()
513 mf->width = priv->rect.width >> priv->half_scale; in ov6650_get_fmt()
514 mf->height = priv->rect.height >> priv->half_scale; in ov6650_get_fmt()
522 static bool is_unscaled_ok(int width, int height, struct v4l2_rect *rect) in is_unscaled_ok() argument
524 return width > rect->width >> 1 || height > rect->height >> 1; in is_unscaled_ok()
551 bool half_scale = !is_unscaled_ok(mf->width, mf->height, &priv->rect); in ov6650_s_fmt()
555 .left = priv->rect.left + (priv->rect.width >> 1) - in ov6650_s_fmt()
557 .top = priv->rect.top + (priv->rect.height >> 1) - in ov6650_s_fmt()
685 mf->width = priv->rect.width >> half_scale; in ov6650_s_fmt()
686 mf->height = priv->rect.height >> half_scale; in ov6650_s_fmt()
702 if (is_unscaled_ok(mf->width, mf->height, &priv->rect)) in ov6650_set_fmt()
1028 priv->rect.left = DEF_HSTRT << 1; in ov6650_probe()
1029 priv->rect.top = DEF_VSTRT << 1; in ov6650_probe()
1030 priv->rect.width = W_CIF; in ov6650_probe()
1031 priv->rect.height = H_CIF; in ov6650_probe()