Home | History | Annotate | Download | only in src

Lines Matching defs:areas

1764        // no more areas than max_num_areas are accepted.
1766 LOGE("%s: error: too many areas specified %s", __func__, str);
1781 static bool validateCameraAreas(camera_area_t *areas, int num_areas)
1786 if((areas[i].x1 == 0) && (areas[i].y1 == 0)
1787 && (areas[i].x2 == 0) && (areas[i].y2 == 0) && (areas[i].weight == 0)) {
1790 if(areas[i].x1 < -1000) return false; // left should be >= -1000
1791 if(areas[i].y1 < -1000) return false; // top should be >= -1000
1792 if(areas[i].x2 > 1000) return false; // right should be <= 1000
1793 if(areas[i].y2 > 1000) return false; // bottom should be <= 1000
1794 if(areas[i].weight <= 0 || areas[i].weight > 1000) // weight should be in [1, 1000]
1796 if(areas[i].x1 >= areas[i].x2) { // left should be < right
1799 if(areas[i].y1 >= areas[i].y2) // top should be < bottom
1818 camera_area_t *areas = new camera_area_t[max_num_af_areas];
1820 if(parseCameraAreaString(str, max_num_af_areas, areas, &num_areas_found) < 0) {
1822 delete areas;
1826 LOGD("FocusArea[%d] = (%d, %d, %d, %d, %d)", i, (areas[i].x1), (areas[i].y1),
1827 (areas[i].x2), (areas[i].y2), (areas[i].weight));
1829 if(validateCameraAreas(areas, num_areas_found) == false) {
1830 LOGE("%s: invalid areas specified : %s", __func__, str);
1831 delete areas;
1840 delete areas;
1846 if(num_areas_found == 1 && (areas[0].x1 == 0) && (areas[0].y1 == 0)
1847 && (areas[0].x2 == 0) && (areas[0].y2 == 0) && (areas[0].weight == 0)) {
1858 x1 = (uint16_t)((areas[0].x1 + 1000.0f)*(previewWidth/2000.0f));
1859 y1 = (uint16_t)((areas[0].y1 + 1000.0f)*(previewHeight/2000.0f));
1860 x2 = (uint16_t)((areas[0].x2 + 1000.0f)*(previewWidth/2000.0f));
1861 y2 = (uint16_t)((areas[0].y2 + 1000.0f)*(previewHeight/2000.0f));
1875 delete areas;
1887 x1 = (uint16_t)((areas[i].x1 + 1000.0f)*(previewWidth/2000.0f));
1888 y1 = (uint16_t)((areas[i].y1 + 1000.0f)*(previewHeight/2000.0f));
1889 x2 = (uint16_t)((areas[i].x2 + 1000.0f)*(previewWidth/2000.0f));
1890 y2 = (uint16_t)((areas[i].y2 + 1000.0f)*(previewHeight/2000.0f));
1897 afArea.weight[i] = areas[i].weight;
1924 camera_area_t *areas = new camera_area_t[max_num_mtr_areas];
1926 if(parseCameraAreaString(str, max_num_mtr_areas, areas, &num_areas_found) < 0) {
1928 delete areas;
1932 LOGD("MeteringArea[%d] = (%d, %d, %d, %d, %d)", i, (areas[i].x1), (areas[i].y1),
1933 (areas[i].x2), (areas[i].y2), (areas[i].weight));
1935 if(validateCameraAreas(areas, num_areas_found) == false) {
1936 LOGE("%s: invalid areas specified : %s", __func__, str);
1937 delete areas;
1945 delete areas;
1953 if(num_areas_found == 1 && (areas[0].x1 == 0) && (areas[0].y1 == 0)
1954 && (areas[0].x2 == 0) && (areas[0].y2 == 0) && (areas[0].weight == 0)) {
1963 x1 = (uint16_t)((areas[0].x1 + 1000.0f)*(previewWidth/2000.0f));
1964 y1 = (uint16_t)((areas[0].y1 + 1000.0f)*(previewHeight/2000.0f));
1965 x2 = (uint16_t)((areas[0].x2 + 1000.0f)*(previewWidth/2000.0f));
1966 y2 = (uint16_t)((areas[0].y2 + 1000.0f)*(previewHeight/2000.0f));
1967 delete areas;
1996 x1 = (uint16_t)((areas[i].x1 + 1000.0f)*(previewWidth/2000.0f));
1997 y1 = (uint16_t)((areas[i].y1 + 1000.0f)*(previewHeight/2000.0f));
1998 x2 = (uint16_t)((areas[i].x2 + 1000.0f)*(previewWidth/2000.0f));
1999 y2 = (uint16_t)((areas[i].y2 + 1000.0f)*(previewHeight/2000.0f));
2006 aecArea.weight[i] = areas[i].weight;
2008 delete areas;