Lines Matching defs:areas
2787 * DESCRIPTION: set focus areas from user setting
2802 ALOGE("%s: max num of AF area is 0, cannot set focus areas", __func__);
2818 * DESCRIPTION: set metering areas from user setting
2833 ALOGE("%s: max num of metering areas is 0, cannot set focus areas", __func__);
4131 // Set focus areas
4140 // Set metering areas
5787 * DESCRIPTION: set focus areas
5790 * @focusAreasStr : focus areas value string
5804 cam_area_t *areas = (cam_area_t *)malloc(sizeof(cam_area_t) * m_pCapability->max_num_focus_areas);
5805 if (NULL == areas) {
5806 ALOGE("%s: No memory for areas", __func__);
5809 memset(areas, 0, sizeof(cam_area_t) * m_pCapability->max_num_focus_areas);
5813 areas,
5816 free(areas);
5820 if (validateCameraAreas(areas, num_areas_found) == false) {
5821 ALOGE("%s: invalid areas specified : %s", __func__, focusAreasStr);
5822 free(areas);
5831 areas[0].rect.left == 0 &&
5832 areas[0].rect.top == 0 &&
5833 areas[0].rect.width == 0 &&
5834 areas[0].rect.height == 0 &&
5835 areas[0].weight == 0) {
5846 __func__, i, (areas[i].rect.top), (areas[i].rect.left),
5847 (areas[i].rect.width), (areas[i].rect.height));
5850 af_roi_value.roi[i].left = (int32_t)((areas[i].rect.left + 1000.0f) * (previewWidth / 2000.0f));
5851 af_roi_value.roi[i].top = (int32_t)((areas[i].rect.top + 1000.0f) * (previewHeight / 2000.0f));
5852 af_roi_value.roi[i].width = (int32_t)(areas[i].rect.width * previewWidth / 2000.0f);
5853 af_roi_value.roi[i].height = (int32_t)(areas[i].rect.height * previewHeight / 2000.0f);
5854 af_roi_value.weight[i] = areas[i].weight;
5856 free(areas);
5866 * DESCRIPTION: set metering areas value
5869 * @meteringAreasStr : metering areas value string
5883 cam_area_t *areas = (cam_area_t *)malloc(sizeof(cam_area_t) * m_pCapability->max_num_metering_areas);
5884 if (NULL == areas) {
5885 ALOGE("%s: No memory for areas", __func__);
5888 memset(areas, 0, sizeof(cam_area_t) * m_pCapability->max_num_metering_areas);
5892 areas,
5895 free(areas);
5899 if (validateCameraAreas(areas, num_areas_found) == false) {
5900 ALOGE("%s: invalid areas specified : %s", __func__, meteringAreasStr);
5901 free(areas);
5910 areas[0].rect.left == 0 &&
5911 areas[0].rect.top == 0 &&
5912 areas[0].rect.width == 0 &&
5913 areas[0].rect.height == 0 &&
5914 areas[0].weight == 0) {
5928 __func__, i, (areas[i].rect.top), (areas[i].rect.left),
5929 (areas[i].rect.width), (areas[i].rect.height));
5933 (uint32_t)(((areas[i].rect.left + areas[i].rect.width / 2) + 1000.0f) * previewWidth / 2000.0f) ;
5935 (uint32_t)(((areas[i].rect.top + areas[i].rect.height / 2) + 1000.0f) * previewHeight / 2000.0f) ;
5940 free(areas);
8196 * DESCRIPTION: helper function to parse a string of camera areas like
8201 * @max_num_areas : max number of areas
8202 * @pAreas : ptr to struct to store areas
8203 * @num_areas_found : number of areas found
8240 // no more areas than max_num_areas are accepted.
8242 ALOGE("%s: error: too many areas specified %s", __func__, str);
8261 * DESCRIPTION: helper function to validate camera areas within (-1000, 1000)
8264 * @areas : ptr to array of areas
8265 * @num_areas : number of areas
8270 bool QCameraParameters::validateCameraAreas(cam_area_t *areas, int num_areas)
8274 areas[0].rect.left == 0 &&
8275 areas[0].rect.top == 0 &&
8276 areas[0].rect.width == 0 &&
8277 areas[0].rect.height == 0 &&
8278 areas[0].weight == 0) {
8284 if(areas[i].rect.left < -1000) {
8289 if(areas[i].rect.top < -1000) {
8294 if (areas[i].rect.width <= 0 || areas[i].rect.height <= 0) {
8299 if(areas[i].rect.left + areas[i].rect.width > 1000) {
8304 if(areas[i].rect.top + areas[i].rect.height > 1000) {
8309 if (areas[i].weight < 1 || areas[i].weight > 1000) {