summaryrefslogtreecommitdiff
authorJiyu Yang <jiyu.yang@amlogic.com>2014-12-23 03:33:30 (GMT)
committer Jiyu Yang <jiyu.yang@amlogic.com>2014-12-23 05:30:11 (GMT)
commit326f4baa3a39a285fe298ba05807adb6a8cf7d6f (patch)
treeed48a744697c8e6d2b532f9ccb72245025bb4428
parent2f94d9f19040fa25253d048edd160cda1e6ccb6d (diff)
downloadcamera-326f4baa3a39a285fe298ba05807adb6a8cf7d6f.zip
camera-326f4baa3a39a285fe298ba05807adb6a8cf7d6f.tar.gz
camera-326f4baa3a39a285fe298ba05807adb6a8cf7d6f.tar.bz2
clear debug info
Change-Id: If3950131a21890d9c08f8b196668de82102c6e3c Signed-off-by: Jiyu Yang <jiyu.yang@amlogic.com>
Diffstat
-rwxr-xr-xv3/EmulatedCameraFactory.cpp2
-rwxr-xr-xv3/EmulatedFakeCamera3.cpp6
-rwxr-xr-xv3/fake-pipeline2/Sensor.cpp91
3 files changed, 45 insertions, 54 deletions
diff --git a/v3/EmulatedCameraFactory.cpp b/v3/EmulatedCameraFactory.cpp
index 94501e6..01629f4 100755
--- a/v3/EmulatedCameraFactory.cpp
+++ b/v3/EmulatedCameraFactory.cpp
@@ -33,7 +33,7 @@
#include "EmulatedCameraFactory.h"
extern camera_module_t HAL_MODULE_INFO_SYM;
-volatile int32_t gCamHal_LogLevel = 6;
+volatile int32_t gCamHal_LogLevel = 4;
/* A global instance of EmulatedCameraFactory is statically instantiated and
* initialized when camera emulation HAL is loaded.
diff --git a/v3/EmulatedFakeCamera3.cpp b/v3/EmulatedFakeCamera3.cpp
index 669f6b5..62c48e5 100755
--- a/v3/EmulatedFakeCamera3.cpp
+++ b/v3/EmulatedFakeCamera3.cpp
@@ -1172,15 +1172,15 @@ status_t EmulatedFakeCamera3::processCaptureRequest(
}
}
- uint8_t len[] = {1};
+ uint8_t len[] = {1};
settings.update(ANDROID_REQUEST_PIPELINE_DEPTH, (uint8_t *)len, 1);
-
+
uint8_t maxlen[] = {0};
settings.update(ANDROID_REQUEST_PIPELINE_MAX_DEPTH, (uint8_t *)maxlen, 1);
res = process3A(settings);
if (res != OK) {
- ALOGE("%s: process3A failed!", __FUNCTION__);
+ CAMHAL_LOGDB("%s: process3A failed!", __FUNCTION__);
//return res;
}
diff --git a/v3/fake-pipeline2/Sensor.cpp b/v3/fake-pipeline2/Sensor.cpp
index d971cac..01fc503 100755
--- a/v3/fake-pipeline2/Sensor.cpp
+++ b/v3/fake-pipeline2/Sensor.cpp
@@ -1669,33 +1669,31 @@ void Sensor::captureRGB(uint8_t *img, uint32_t gain, uint32_t stride) {
return;
}
if (ConvertMjpegToNV21(src, vinfo->picture.buf.bytesused, tmp_buffer,
- width, tmp_buffer + width * height, (width + 1) / 2, width,
- height, width, height, libyuv::FOURCC_MJPG) != 0) {
- DBG_LOGA("Decode MJPEG frame failed\n");
- } else {
- DBG_LOGA("Decode MJPEG frame succeed\n");
+ width, tmp_buffer + width * height, (width + 1) / 2, width,
+ height, width, height, libyuv::FOURCC_MJPG) != 0) {
+ DBG_LOGA("Decode MJPEG frame failed\n");
}
nv21_to_rgb24(tmp_buffer,img,width,height);
if (tmp_buffer != NULL)
delete [] tmp_buffer;
} else if (vinfo->picture.format.fmt.pix.pixelformat == V4L2_PIX_FMT_YUYV) {
- yuyv422_to_rgb24(src,img,width,height);
+ yuyv422_to_rgb24(src,img,width,height);
}
-
+
if (vinfo->picture.format.fmt.pix.pixelformat == V4L2_PIX_FMT_RGB24){
- if (vinfo->picture.buf.length == width*height*3) {
- memcpy(img, src, vinfo->picture.buf.length);
- } else {
- rgb24_memcpy( img, src, width, height);
- }
- }
+ if (vinfo->picture.buf.length == width*height*3) {
+ memcpy(img, src, vinfo->picture.buf.length);
+ } else {
+ rgb24_memcpy( img, src, width, height);
+ }
+ }
if (mSensorType == SENSOR_USB) {
releasebuf_and_stop_picture(vinfo);
} else {
stop_picture(vinfo);
}
-
+
#endif
}
@@ -1917,13 +1915,11 @@ void Sensor::captureNV21(StreamBuffer b, uint32_t gain) {
continue;
if (vinfo->preview.format.fmt.pix.pixelformat == V4L2_PIX_FMT_NV21) {
memcpy(b.img, src, vinfo->preview.buf.length);
- framecount++;
}
else if (vinfo->preview.format.fmt.pix.pixelformat == V4L2_PIX_FMT_YUYV) {
int width = vinfo->preview.format.fmt.pix.width;
int height = vinfo->preview.format.fmt.pix.height;
YUYVToNV21(src, b.img, width, height);
- framecount++;
}
else if (vinfo->preview.format.fmt.pix.pixelformat == V4L2_PIX_FMT_MJPEG) {
int width = vinfo->preview.format.fmt.pix.width;
@@ -1934,13 +1930,11 @@ void Sensor::captureNV21(StreamBuffer b, uint32_t gain) {
putback_frame(vinfo);
DBG_LOGA("Decode MJPEG frame failed\n");
continue;
- } else {
- framecount++;
- DBG_LOGA("Decode MJPEG frame succeed\n");
}
} else {
ALOGE("Unable known sensor format: %d", vinfo->preview.format.fmt.pix.pixelformat);
}
+ framecount++;
break;
}
@@ -2088,39 +2082,36 @@ void Sensor::captureYV12(StreamBuffer b, uint32_t gain) {
return ;
}
while(1){
- src = (uint8_t *)get_frame(vinfo);
- usleep(30000);
- if (NULL == src)
- continue;
- if (vinfo->preview.format.fmt.pix.pixelformat == V4L2_PIX_FMT_YVU420) {
- memcpy(b.img, src, vinfo->preview.buf.length);
- framecount++;
- }
-
- else if (vinfo->preview.format.fmt.pix.pixelformat == V4L2_PIX_FMT_YUYV) {
- int width = vinfo->preview.format.fmt.pix.width;
- int height = vinfo->preview.format.fmt.pix.height;
- YUYVToYV12(src, b.img, width, height);
- framecount++;
- }
- else if (vinfo->preview.format.fmt.pix.pixelformat == V4L2_PIX_FMT_MJPEG) {
- int width = vinfo->preview.format.fmt.pix.width;
- int height = vinfo->preview.format.fmt.pix.height;
- if (ConvertToI420(src, vinfo->preview.buf.bytesused, b.img, width, b.img + width * height + width * height / 4, (width + 1) / 2,
- b.img + width * height, (width + 1) / 2, 0, 0, width, height,
- width, height, libyuv::kRotate0, libyuv::FOURCC_MJPG) != 0) {
- putback_frame(vinfo);
- DBG_LOGA("Decode MJPEG frame failed\n");
- continue;
- } else {
- framecount++;
- DBG_LOGA("Decode MJPEG frame succeed\n");
- }
- } else {
- ALOGE("Unable known sensor format: %d", vinfo->preview.format.fmt.pix.pixelformat);
+ src = (uint8_t *)get_frame(vinfo);
+ usleep(30000);
+ if (NULL == src)
+ continue;
+ if (vinfo->preview.format.fmt.pix.pixelformat == V4L2_PIX_FMT_YVU420) {
+ memcpy(b.img, src, vinfo->preview.buf.length);
+ }
+
+ else if (vinfo->preview.format.fmt.pix.pixelformat == V4L2_PIX_FMT_YUYV) {
+ int width = vinfo->preview.format.fmt.pix.width;
+ int height = vinfo->preview.format.fmt.pix.height;
+ YUYVToYV12(src, b.img, width, height);
+ }
+ else if (vinfo->preview.format.fmt.pix.pixelformat == V4L2_PIX_FMT_MJPEG) {
+ int width = vinfo->preview.format.fmt.pix.width;
+ int height = vinfo->preview.format.fmt.pix.height;
+ if (ConvertToI420(src, vinfo->preview.buf.bytesused, b.img, width, b.img + width * height + width * height / 4, (width + 1) / 2,
+ b.img + width * height, (width + 1) / 2, 0, 0, width, height,
+ width, height, libyuv::kRotate0, libyuv::FOURCC_MJPG) != 0) {
+ putback_frame(vinfo);
+ DBG_LOGA("Decode MJPEG frame failed\n");
+ continue;
}
+ } else {
+ ALOGE("Unable known sensor format: %d", vinfo->preview.format.fmt.pix.pixelformat);
+ }
- break;
+ framecount++;
+
+ break;
}
#endif
if (framecount == 100 ) {