Lines Matching defs:areas
2117 * DESCRIPTION: set focus areas from user setting
2132 ALOGE("%s: max num of AF area is 0, cannot set focus areas", __func__);
2148 * DESCRIPTION: set metering areas from user setting
2163 ALOGE("%s: max num of metering areas is 0, cannot set focus areas", __func__);
3005 // Set focus areas
3014 // Set metering areas
4247 * DESCRIPTION: set focus areas
4250 * @focusAreasStr : focus areas value string
4264 cam_area_t *areas = (cam_area_t *)malloc(sizeof(cam_area_t) * m_pCapability->max_num_focus_areas);
4265 if (NULL == areas) {
4266 ALOGE("%s: No memory for areas", __func__);
4269 memset(areas, 0, sizeof(cam_area_t) * m_pCapability->max_num_focus_areas);
4273 areas,
4276 free(areas);
4280 if (validateCameraAreas(areas, num_areas_found) == false) {
4281 ALOGE("%s: invalid areas specified : %s", __func__, focusAreasStr);
4282 free(areas);
4291 areas[0].rect.left == 0 &&
4292 areas[0].rect.top == 0 &&
4293 areas[0].rect.width == 0 &&
4294 areas[0].rect.height == 0 &&
4295 areas[0].weight == 0) {
4306 __func__, i, (areas[i].rect.top), (areas[i].rect.left),
4307 (areas[i].rect.width), (areas[i].rect.height));
4310 af_roi_value.roi[i].left = (int32_t)((areas[i].rect.left + 1000.0f) * (previewWidth / 2000.0f));
4311 af_roi_value.roi[i].top = (int32_t)((areas[i].rect.top + 1000.0f) * (previewHeight / 2000.0f));
4312 af_roi_value.roi[i].width = (int32_t)(areas[i].rect.width * previewWidth / 2000.0f);
4313 af_roi_value.roi[i].height = (int32_t)(areas[i].rect.height * previewHeight / 2000.0f);
4314 af_roi_value.weight[i] = areas[i].weight;
4316 free(areas);
4326 * DESCRIPTION: set metering areas value
4329 * @meteringAreasStr : metering areas value string
4343 cam_area_t *areas = (cam_area_t *)malloc(sizeof(cam_area_t) * m_pCapability->max_num_metering_areas);
4344 if (NULL == areas) {
4345 ALOGE("%s: No memory for areas", __func__);
4348 memset(areas, 0, sizeof(cam_area_t) * m_pCapability->max_num_metering_areas);
4352 areas,
4355 free(areas);
4359 if (validateCameraAreas(areas, num_areas_found) == false) {
4360 ALOGE("%s: invalid areas specified : %s", __func__, meteringAreasStr);
4361 free(areas);
4370 areas[0].rect.left == 0 &&
4371 areas[0].rect.top == 0 &&
4372 areas[0].rect.width == 0 &&
4373 areas[0].rect.height == 0 &&
4374 areas[0].weight == 0) {
4388 __func__, i, (areas[i].rect.top), (areas[i].rect.left),
4389 (areas[i].rect.width), (areas[i].rect.height));
4393 (uint32_t)(((areas[i].rect.left + areas[i].rect.width / 2) + 1000.0f) * previewWidth / 2000.0f) ;
4395 (uint32_t)(((areas[i].rect.top + areas[i].rect.height / 2) + 1000.0f) * previewHeight / 2000.0f) ;
4400 free(areas);
5811 * DESCRIPTION: helper function to parse a string of camera areas like
5816 * @max_num_areas : max number of areas
5817 * @pAreas : ptr to struct to store areas
5818 * @num_areas_found : number of areas found
5855 // no more areas than max_num_areas are accepted.
5857 ALOGE("%s: error: too many areas specified %s", __func__, str);
5876 * DESCRIPTION: helper function to validate camera areas within (-1000, 1000)
5879 * @areas : ptr to array of areas
5880 * @num_areas : number of areas
5885 bool QCameraParameters::validateCameraAreas(cam_area_t *areas, int num_areas)
5889 areas[0].rect.left == 0 &&
5890 areas[0].rect.top == 0 &&
5891 areas[0].rect.width == 0 &&
5892 areas[0].rect.height == 0 &&
5893 areas[0].weight == 0) {
5899 if(areas[i].rect.left < -1000) {
5904 if(areas[i].rect.top < -1000) {
5909 if (areas[i].rect.width <= 0 || areas[i].rect.height <= 0) {
5914 if(areas[i].rect.left + areas[i].rect.width > 1000) {
5919 if(areas[i].rect.top + areas[i].rect.height > 1000) {
5924 if (areas[i].weight < 1 || areas[i].weight > 1000) {