Home
last modified time | relevance | path

Searched refs:crop (Results 1 – 25 of 166) sorted by relevance

1234567

/hardware/google/gchips/gralloc4/src/hidl_common/
DSharedMetadata.cpp48 void get_crop_rect(const private_handle_t *hnd, std::optional<Rect> *crop) in get_crop_rect() argument
51 *crop = metadata->crop.to_std_optional(); in get_crop_rect()
54 android::status_t set_crop_rect(const private_handle_t *hnd, const Rect &crop) in set_crop_rect() argument
58 if (crop.top < 0 || crop.left < 0 || in set_crop_rect()
59 crop.left > crop.right || crop.right > hnd->plane_info[0].alloc_width || in set_crop_rect()
60 crop.top > crop.bottom || crop.bottom > hnd->plane_info[0].alloc_height || in set_crop_rect()
61 (crop.right - crop.left) != hnd->width || in set_crop_rect()
62 (crop.bottom - crop.top) != hnd->height) in set_crop_rect()
68 metadata->crop = aligned_optional(crop); in set_crop_rect()
/hardware/google/graphics/common/libscaler/
Dlibscaler-m2m1shot.cpp112 m_task.fmt_out.crop.width, m_task.fmt_out.crop.height, in Run()
113 m_task.fmt_cap.crop.width, m_task.fmt_cap.crop.height, in Run()
190 fmt.crop.left = l; in SetCrop()
191 fmt.crop.top = t; in SetCrop()
192 fmt.crop.width = w; in SetCrop()
193 fmt.crop.height = h; in SetCrop()
278 m_task.fmt_out.crop.width, m_task.fmt_out.crop.height, in RunSWScaling()
279 m_task.fmt_cap.crop.width, m_task.fmt_cap.crop.height); in RunSWScaling()
330 swsc->SetSrcRect(m_task.fmt_out.crop.left, m_task.fmt_out.crop.top, in RunSWScaling()
331 m_task.fmt_out.crop.width, m_task.fmt_out.crop.height, in RunSWScaling()
[all …]
Dlibscaler-v4l2.cpp117 m_frmSrc.crop.width, m_frmSrc.crop.height, in Run()
118 m_frmDst.crop.width, m_frmDst.crop.height, in Run()
317 v4l2_crop crop; in DevSetFormat() local
318 crop.type = frm.type; in DevSetFormat()
319 crop.c = frm.crop; in DevSetFormat()
321 if (ioctl(m_fdScaler, VIDIOC_S_CROP, &crop) < 0) { in DevSetFormat()
323 crop.type, crop.c.left, crop.c.top, crop.c.width, crop.c.height, in DevSetFormat()
560 m_frmSrc.crop.width, m_frmSrc.crop.height, in RunSWScaling()
561 m_frmDst.crop.width, m_frmDst.crop.height); in RunSWScaling()
638 swsc->SetSrcRect(m_frmSrc.crop.left, m_frmSrc.crop.top, in RunSWScaling()
[all …]
/hardware/qcom/camera/msm8998/QCamera2/stack/mm-jpeg-interface/src/
Dmm_jpeg.c1159 cropped_height = p_thumb_dim->crop.height; in mm_jpeg_update_thumbnail_crop()
1167 cropped_width = p_thumb_dim->crop.width; in mm_jpeg_update_thumbnail_crop()
1174 p_thumb_dim->crop.left = p_thumb_dim->crop.left + in mm_jpeg_update_thumbnail_crop()
1175 floor((p_thumb_dim->crop.width - cropped_width) / 2); in mm_jpeg_update_thumbnail_crop()
1176 if (p_thumb_dim->crop.left % 2) { in mm_jpeg_update_thumbnail_crop()
1177 p_thumb_dim->crop.left -= 1; in mm_jpeg_update_thumbnail_crop()
1179 p_thumb_dim->crop.top = p_thumb_dim->crop.top + in mm_jpeg_update_thumbnail_crop()
1180 floor((p_thumb_dim->crop.height - cropped_height) / 2); in mm_jpeg_update_thumbnail_crop()
1181 if (p_thumb_dim->crop.top % 2) { in mm_jpeg_update_thumbnail_crop()
1182 p_thumb_dim->crop.top -= 1; in mm_jpeg_update_thumbnail_crop()
[all …]
/hardware/qcom/display/msm8960/libhwcomposer/
Dhwc_utils.cpp554 void calculate_crop_rects(hwc_rect_t& crop, hwc_rect_t& dst, in calculate_crop_rects() argument
557 int& crop_l = crop.left; in calculate_crop_rects()
558 int& crop_t = crop.top; in calculate_crop_rects()
559 int& crop_r = crop.right; in calculate_crop_rects()
560 int& crop_b = crop.bottom; in calculate_crop_rects()
561 int crop_w = crop.right - crop.left; in calculate_crop_rects()
562 int crop_h = crop.bottom - crop.top; in calculate_crop_rects()
780 hwc_rect_t& crop, hwc_rect_t& dst) { in trimLayer() argument
786 qhwc::calculate_crop_rects(crop, dst, scissor, transform); in trimLayer()
893 const eTransform& orient, const hwc_rect_t& crop, in configMdp() argument
[all …]
/hardware/qcom/display/msm8994/libhwcomposer/
Dhwc_utils.cpp970 hwc_rect_t& crop, hwc_rect_t& dst) { in trimLayer() argument
977 qhwc::calculate_crop_rects(crop, dst, scissor, transform); in trimLayer()
985 hwc_rect_t crop = integerizeSourceCrop(layer->sourceCropf); in trimList() local
990 (hwc_rect_t&)crop, in trimList()
992 layer->sourceCropf.left = (float)crop.left; in trimList()
993 layer->sourceCropf.right = (float)crop.right; in trimList()
994 layer->sourceCropf.top = (float)crop.top; in trimList()
995 layer->sourceCropf.bottom = (float)crop.bottom; in trimList()
1249 void calculate_crop_rects(hwc_rect_t& crop, hwc_rect_t& dst, in calculate_crop_rects() argument
1252 int& crop_l = crop.left; in calculate_crop_rects()
[all …]
/hardware/qcom/display/msm8084/libhwcomposer/
Dhwc_utils.cpp805 hwc_rect_t& crop, hwc_rect_t& dst) { in trimLayer() argument
812 qhwc::calculate_crop_rects(crop, dst, scissor, transform); in trimLayer()
820 hwc_rect_t crop = integerizeSourceCrop(layer->sourceCropf); in trimList() local
823 (hwc_rect_t&)crop, in trimList()
825 layer->sourceCropf.left = (float)crop.left; in trimList()
826 layer->sourceCropf.right = (float)crop.right; in trimList()
827 layer->sourceCropf.top = (float)crop.top; in trimList()
828 layer->sourceCropf.bottom = (float)crop.bottom; in trimList()
1044 void calculate_crop_rects(hwc_rect_t& crop, hwc_rect_t& dst, in calculate_crop_rects() argument
1047 int& crop_l = crop.left; in calculate_crop_rects()
[all …]
/hardware/qcom/display/msm8994/liboverlay/
DoverlayMdssRot.cpp121 void MdssRot::setCrop(const utils::Dim& crop) { in setCrop() argument
122 mRotInfo.src_rect.x = crop.x; in setCrop()
123 mRotInfo.src_rect.y = crop.y; in setCrop()
124 mRotInfo.src_rect.w = crop.w; in setCrop()
125 mRotInfo.src_rect.h = crop.h; in setCrop()
385 Dim crop(0, 0, srcW, srcH); in getDownscaleFactor() local
386 Dim adjCrop = getFormatAdjustedCrop(crop, mdpFormat, in getDownscaleFactor()
410 Dim MdssRot::getFormatAdjustedCrop(const Dim& crop, in getFormatAdjustedCrop() argument
412 Dim adjCrop = crop; in getFormatAdjustedCrop()
423 Dim MdssRot::getDownscaleAdjustedCrop(const Dim& crop, in getDownscaleAdjustedCrop() argument
[all …]
/hardware/qcom/display/msm8226/libhwcomposer/
Dhwc_utils.cpp792 hwc_rect_t& crop, hwc_rect_t& dst) { in trimLayer() argument
799 qhwc::calculate_crop_rects(crop, dst, scissor, transform); in trimLayer()
807 hwc_rect_t crop = integerizeSourceCrop(layer->sourceCropf); in trimList() local
810 (hwc_rect_t&)crop, in trimList()
812 layer->sourceCropf.left = (float)crop.left; in trimList()
813 layer->sourceCropf.right = (float)crop.right; in trimList()
814 layer->sourceCropf.top = (float)crop.top; in trimList()
815 layer->sourceCropf.bottom = (float)crop.bottom; in trimList()
1031 void calculate_crop_rects(hwc_rect_t& crop, hwc_rect_t& dst, in calculate_crop_rects() argument
1034 int& crop_l = crop.left; in calculate_crop_rects()
[all …]
/hardware/google/gfxstream/host/gl/
DTextureDraw.cpp623 float crop[4]; in drawLayer() local
624 crop[0] = layer.crop.left/cbWidth; in drawLayer()
625 crop[1] = layer.crop.top/cbHeight; in drawLayer()
626 crop[2] = layer.crop.right/cbWidth; in drawLayer()
627 crop[3] = layer.crop.bottom/cbHeight; in drawLayer()
634 s_gles2.glUniform2f(mCoordTranslation, crop[0], crop[3]); in drawLayer()
635 s_gles2.glUniform2f(mCoordScale, crop[2] - crop[0], crop[1] - crop[3]); in drawLayer()
/hardware/qcom/display/msm8998/sdm/libs/core/
Dresource_default.cpp602 bool ResourceDefault::CalculateCropRects(const LayerRect &scissor, LayerRect *crop, in CalculateCropRects() argument
604 float &crop_left = crop->left; in CalculateCropRects()
605 float &crop_top = crop->top; in CalculateCropRects()
606 float &crop_right = crop->right; in CalculateCropRects()
607 float &crop_bottom = crop->bottom; in CalculateCropRects()
608 float crop_width = crop->right - crop->left; in CalculateCropRects()
609 float crop_height = crop->bottom - crop->top; in CalculateCropRects()
657 Normalize(1, 1, crop); in CalculateCropRects()
659 if (IsValid(*crop) && IsValid(*dst)) in CalculateCropRects()
694 DisplayError ResourceDefault::ValidateDimensions(const LayerRect &crop, const LayerRect &dst) { in ValidateDimensions() argument
[all …]
/hardware/qcom/display/msm8909w_3100/sdm/libs/core/
Dresource_default.cpp602 bool ResourceDefault::CalculateCropRects(const LayerRect &scissor, LayerRect *crop, in CalculateCropRects() argument
604 float &crop_left = crop->left; in CalculateCropRects()
605 float &crop_top = crop->top; in CalculateCropRects()
606 float &crop_right = crop->right; in CalculateCropRects()
607 float &crop_bottom = crop->bottom; in CalculateCropRects()
608 float crop_width = crop->right - crop->left; in CalculateCropRects()
609 float crop_height = crop->bottom - crop->top; in CalculateCropRects()
657 Normalize(1, 1, crop); in CalculateCropRects()
659 if (IsValid(*crop) && IsValid(*dst)) in CalculateCropRects()
694 DisplayError ResourceDefault::ValidateDimensions(const LayerRect &crop, const LayerRect &dst) { in ValidateDimensions() argument
[all …]
/hardware/qcom/sm8150/display/sdm/libs/core/
Dresource_default.cpp594 bool ResourceDefault::CalculateCropRects(const LayerRect &scissor, LayerRect *crop, in CalculateCropRects() argument
596 float &crop_left = crop->left; in CalculateCropRects()
597 float &crop_top = crop->top; in CalculateCropRects()
598 float &crop_right = crop->right; in CalculateCropRects()
599 float &crop_bottom = crop->bottom; in CalculateCropRects()
600 float crop_width = crop->right - crop->left; in CalculateCropRects()
601 float crop_height = crop->bottom - crop->top; in CalculateCropRects()
649 Normalize(1, 1, crop); in CalculateCropRects()
651 if (IsValid(*crop) && IsValid(*dst)) in CalculateCropRects()
686 DisplayError ResourceDefault::ValidateDimensions(const LayerRect &crop, const LayerRect &dst) { in ValidateDimensions() argument
[all …]
/hardware/qcom/sm7250/display/sdm/libs/core/
Dresource_default.cpp591 bool ResourceDefault::CalculateCropRects(const LayerRect &scissor, LayerRect *crop, in CalculateCropRects() argument
593 float &crop_left = crop->left; in CalculateCropRects()
594 float &crop_top = crop->top; in CalculateCropRects()
595 float &crop_right = crop->right; in CalculateCropRects()
596 float &crop_bottom = crop->bottom; in CalculateCropRects()
597 float crop_width = crop->right - crop->left; in CalculateCropRects()
598 float crop_height = crop->bottom - crop->top; in CalculateCropRects()
646 Normalize(1, 1, crop); in CalculateCropRects()
648 if (IsValid(*crop) && IsValid(*dst)) in CalculateCropRects()
683 DisplayError ResourceDefault::ValidateDimensions(const LayerRect &crop, const LayerRect &dst) { in ValidateDimensions() argument
[all …]
/hardware/qcom/display/msm8996/sdm/libs/core/
Dresource_default.cpp565 bool ResourceDefault::CalculateCropRects(const LayerRect &scissor, LayerRect *crop, in CalculateCropRects() argument
567 float &crop_left = crop->left; in CalculateCropRects()
568 float &crop_top = crop->top; in CalculateCropRects()
569 float &crop_right = crop->right; in CalculateCropRects()
570 float &crop_bottom = crop->bottom; in CalculateCropRects()
571 float crop_width = crop->right - crop->left; in CalculateCropRects()
572 float crop_height = crop->bottom - crop->top; in CalculateCropRects()
620 Normalize(1, 1, crop); in CalculateCropRects()
622 if (IsValid(*crop) && IsValid(*dst)) in CalculateCropRects()
657 DisplayError ResourceDefault::ValidateDimensions(const LayerRect &crop, const LayerRect &dst) { in ValidateDimensions() argument
[all …]
/hardware/qcom/display/msm8909/sdm/libs/core/
Dresource_default.cpp602 bool ResourceDefault::CalculateCropRects(const LayerRect &scissor, LayerRect *crop, in CalculateCropRects() argument
604 float &crop_left = crop->left; in CalculateCropRects()
605 float &crop_top = crop->top; in CalculateCropRects()
606 float &crop_right = crop->right; in CalculateCropRects()
607 float &crop_bottom = crop->bottom; in CalculateCropRects()
608 float crop_width = crop->right - crop->left; in CalculateCropRects()
609 float crop_height = crop->bottom - crop->top; in CalculateCropRects()
657 Normalize(1, 1, crop); in CalculateCropRects()
659 if (IsValid(*crop) && IsValid(*dst)) in CalculateCropRects()
694 DisplayError ResourceDefault::ValidateDimensions(const LayerRect &crop, const LayerRect &dst) { in ValidateDimensions() argument
[all …]
/hardware/google/graphics/common/libv4l2/
Dexynos_v4l2.h79 int exynos_v4l2_cropcap(int fd, struct v4l2_cropcap *crop);
81 int exynos_v4l2_g_crop(int fd, struct v4l2_crop *crop);
83 int exynos_v4l2_s_crop(int fd, struct v4l2_crop *crop);
117 int exynos_subdev_g_crop(int fd, struct v4l2_subdev_crop *crop);
119 int exynos_subdev_s_crop(int fd, struct v4l2_subdev_crop *crop);
Dexynos_v4l2.c617 int exynos_v4l2_cropcap(int fd, struct v4l2_cropcap *crop) in exynos_v4l2_cropcap() argument
628 if (!crop) { in exynos_v4l2_cropcap()
633 if (__v4l2_check_buf_type(crop->type) == false) { in exynos_v4l2_cropcap()
638 ret = ioctl(fd, VIDIOC_CROPCAP, crop); in exynos_v4l2_cropcap()
649 int exynos_v4l2_g_crop(int fd, struct v4l2_crop *crop) in exynos_v4l2_g_crop() argument
660 if (!crop) { in exynos_v4l2_g_crop()
665 if (__v4l2_check_buf_type(crop->type) == false) { in exynos_v4l2_g_crop()
670 ret = ioctl(fd, VIDIOC_G_CROP, crop); in exynos_v4l2_g_crop()
681 int exynos_v4l2_s_crop(int fd, struct v4l2_crop *crop) in exynos_v4l2_s_crop() argument
692 if (!crop) { in exynos_v4l2_s_crop()
[all …]
Dexynos_subdev.c297 int exynos_subdev_g_crop(int fd, struct v4l2_subdev_crop *crop) in exynos_subdev_g_crop() argument
306 if (!crop) { in exynos_subdev_g_crop()
311 ret = ioctl(fd, VIDIOC_SUBDEV_G_CROP, crop); in exynos_subdev_g_crop()
324 int exynos_subdev_s_crop(int fd, struct v4l2_subdev_crop *crop) in exynos_subdev_s_crop() argument
333 if (!crop) { in exynos_subdev_s_crop()
338 ret = ioctl(fd, VIDIOC_SUBDEV_S_CROP, crop); in exynos_subdev_s_crop()
/hardware/google/gchips/include/
Dexynos_v4l2.h79 int exynos_v4l2_cropcap(int fd, struct v4l2_cropcap *crop);
81 int exynos_v4l2_g_crop(int fd, struct v4l2_crop *crop);
83 int exynos_v4l2_s_crop(int fd, struct v4l2_crop *crop);
117 int exynos_subdev_g_crop(int fd, struct v4l2_subdev_crop *crop);
119 int exynos_subdev_s_crop(int fd, struct v4l2_subdev_crop *crop);
/hardware/google/gfxstream/common/end2end/
DGfxstreamEnd2EndCompositionTests.cpp50 .crop = in TEST_P()
78 .crop = in TEST_P()
126 .crop = in TEST_P()
154 .crop = in TEST_P()
/hardware/qcom/camera/msm8998/QCamera2/HAL3/
DQCamera3PostProc.cpp1255 cam_rect_t crop; in encodeFWKData() local
1256 memset(&crop, 0, sizeof(cam_rect_t)); in encodeFWKData()
1264 memcpy(&crop, &(jpeg_crop->crop), sizeof(cam_rect_t)); in encodeFWKData()
1392 jpg_job.encode_job.main_dim.crop.width = crop.height; in encodeFWKData()
1393 jpg_job.encode_job.main_dim.crop.height = crop.width; in encodeFWKData()
1394 jpg_job.encode_job.main_dim.crop.left = crop.top; in encodeFWKData()
1395 jpg_job.encode_job.main_dim.crop.top = crop.left; in encodeFWKData()
1399 jpg_job.encode_job.main_dim.crop = crop; in encodeFWKData()
1443 jpg_job.encode_job.thumb_dim.crop.width = crop.height; in encodeFWKData()
1444 jpg_job.encode_job.thumb_dim.crop.height = crop.width; in encodeFWKData()
[all …]
/hardware/google/graphics/common/libgscaler/
Dexynos_subdev.c300 int exynos_subdev_g_crop(int fd, struct v4l2_subdev_crop *crop) in exynos_subdev_g_crop() argument
309 if (!crop) { in exynos_subdev_g_crop()
314 ret = ioctl(fd, VIDIOC_SUBDEV_G_CROP, crop); in exynos_subdev_g_crop()
327 int exynos_subdev_s_crop(int fd, struct v4l2_subdev_crop *crop) in exynos_subdev_s_crop() argument
336 if (!crop) { in exynos_subdev_s_crop()
341 ret = ioctl(fd, VIDIOC_SUBDEV_S_CROP, crop); in exynos_subdev_s_crop()
/hardware/qcom/display/msm8084/liboverlay/
DoverlayMdssRot.cpp84 void MdssRot::setCrop(const utils::Dim& crop) { in setCrop() argument
86 mRotInfo.src_rect.x = crop.x; in setCrop()
87 mRotInfo.src_rect.y = crop.y; in setCrop()
88 mRotInfo.src_rect.w = crop.w; in setCrop()
89 mRotInfo.src_rect.h = crop.h; in setCrop()
93 mRotInfo.dst_rect.w = crop.w; in setCrop()
94 mRotInfo.dst_rect.h = crop.h; in setCrop()
/hardware/qcom/display/msm8909/sdm/libs/hwc2/
Dhwc_layers.cpp412 HWC2::Error HWCLayer::SetLayerSourceCrop(hwc_frect_t crop) { in SetLayerSourceCrop() argument
414 SetRect(crop, &src_rect); in SetLayerSourceCrop()
415 non_integral_source_crop_ = ((crop.left != roundf(crop.left)) || in SetLayerSourceCrop()
416 (crop.top != roundf(crop.top)) || in SetLayerSourceCrop()
417 (crop.right != roundf(crop.right)) || in SetLayerSourceCrop()
418 (crop.bottom != roundf(crop.bottom))); in SetLayerSourceCrop()
420 DLOGV_IF(kTagClient, "Crop: LRTB %f %f %f %f", crop.left, crop.top, crop.right, crop.bottom); in SetLayerSourceCrop()

1234567