summaryrefslogtreecommitdiff
authorjiyu.yang <jiyu.yang@amlogic.com>2014-12-09 12:11:47 (GMT)
committer jiyu.yang <jiyu.yang@amlogic.com>2014-12-09 12:11:47 (GMT)
commit6f2b30e443f3bf29a2b893a2e4ce35568750b85b (patch)
treec21df0f2cbdfaf1ca2000619a8668583b0e6d62e
parent7aa85728f41a417e9ca172b7af0998cc051486ea (diff)
downloadcamera-6f2b30e443f3bf29a2b893a2e4ce35568750b85b.zip
camera-6f2b30e443f3bf29a2b893a2e4ce35568750b85b.tar.gz
camera-6f2b30e443f3bf29a2b893a2e4ce35568750b85b.tar.bz2
remove HAL_PIXEL_FORMAT_YCbCr_422_I
Change-Id: Ic10e95551b63b33329f732fde920735f2406010d
Diffstat
-rwxr-xr-xv3/EmulatedFakeCamera3.cpp6
-rwxr-xr-xv3/fake-pipeline2/Sensor.cpp25
2 files changed, 13 insertions, 18 deletions
diff --git a/v3/EmulatedFakeCamera3.cpp b/v3/EmulatedFakeCamera3.cpp
index 24b0fa2..d2bea83 100755
--- a/v3/EmulatedFakeCamera3.cpp
+++ b/v3/EmulatedFakeCamera3.cpp
@@ -66,7 +66,7 @@ const int32_t EmulatedFakeCamera3::kAvailableFormats[] = {
// These are handled by YCbCr_420_888
HAL_PIXEL_FORMAT_YV12,
HAL_PIXEL_FORMAT_YCrCb_420_SP,
- HAL_PIXEL_FORMAT_YCbCr_422_I,
+ //HAL_PIXEL_FORMAT_YCbCr_422_I,
HAL_PIXEL_FORMAT_YCbCr_420_888
};
@@ -1365,7 +1365,9 @@ status_t EmulatedFakeCamera3::processCaptureRequest(
/** Debug methods */
void EmulatedFakeCamera3::dump(int fd) {
- mSensor->dump(fd);
+ if (mSensor.get() != NULL) {
+ mSensor->dump(fd);
+ }
}
//flush all request
//TODO returned buffers every request held immediately with
diff --git a/v3/fake-pipeline2/Sensor.cpp b/v3/fake-pipeline2/Sensor.cpp
index 6f2b093..111a33c 100755
--- a/v3/fake-pipeline2/Sensor.cpp
+++ b/v3/fake-pipeline2/Sensor.cpp
@@ -1201,6 +1201,7 @@ int Sensor::getStreamConfigurations(uint32_t picSizes[], const int32_t kAvailabl
}
+#if 0
if (frmsize.pixel_format == V4L2_PIX_FMT_YUYV) {
START = count;
for(i=0;;i++, count+=4){
@@ -1249,6 +1250,7 @@ int Sensor::getStreamConfigurations(uint32_t picSizes[], const int32_t kAvailabl
}
}
+#endif
uint32_t jpgSrcfmt[] = {
V4L2_PIX_FMT_RGB24,
@@ -1737,7 +1739,6 @@ void Sensor::captureNV21(StreamBuffer b, uint32_t gain) {
if (mKernelBuffer) {
src = mKernelBuffer;
if (vinfo->preview.format.fmt.pix.pixelformat == V4L2_PIX_FMT_NV21) {
- ALOGI("Sclale NV21 frame down \n");
//memcpy(b.img, src, 200 * 100 * 3 / 2 /*vinfo->preview.buf.length*/);
structConvImage input = {(mmInt32)vinfo->preview.format.fmt.pix.width,
(mmInt32)vinfo->preview.format.fmt.pix.height,
@@ -1853,8 +1854,8 @@ void Sensor::captureNV21(StreamBuffer b, uint32_t gain) {
width, b.img + width * height, (width + 1) / 2, width,
height, width, height, libyuv::FOURCC_MJPG) != 0) {
putback_frame(vinfo);
- continue;
DBG_LOGA("Decode MJPEG frame failed\n");
+ continue;
} else {
framecount++;
DBG_LOGA("Decode MJPEG frame success\n");
@@ -2031,8 +2032,8 @@ void Sensor::captureYV12(StreamBuffer b, uint32_t gain) {
b.img + width * height, (width + 1) / 2, 0, 0, width, height,
width, height, libyuv::kRotate0, libyuv::FOURCC_MJPG) != 0) {
putback_frame(vinfo);
- continue;
DBG_LOGA("Decode MJPEG frame failed\n");
+ continue;
} else {
framecount++;
DBG_LOGA("Decode MJPEG frame success\n");
@@ -2148,22 +2149,14 @@ void Sensor::captureYUYV(uint8_t *img, uint32_t gain, uint32_t stride) {
void Sensor::dump(int fd) {
String8 result;
- result = String8::format("camera preview information: \n");
+ result = String8::format("%s, sensor preview information: \n", __FILE__);
result.appendFormat("camera preview fps: %d\n", fps);
result.appendFormat("camera preview width: %d , height =%d\n",
vinfo->preview.format.fmt.pix.width,vinfo->preview.format.fmt.pix.height);
- if (vinfo->preview.format.fmt.pix.pixelformat == V4L2_PIX_FMT_NV21) {
- result.appendFormat("camera preview format: %s\n\n", "V4L2_PIX_FMT_NV21");
- }
- if (vinfo->preview.format.fmt.pix.pixelformat == V4L2_PIX_FMT_YVU420) {
- result.appendFormat("camera preview format: %s\n\n", "V4L2_PIX_FMT_YVU420");
- }
- if (vinfo->preview.format.fmt.pix.pixelformat == V4L2_PIX_FMT_YUYV) {
- result.appendFormat("camera preview format: %s\n\n", "V4L2_PIX_FMT_YUYV");
- }
- if (vinfo->preview.format.fmt.pix.pixelformat == V4L2_PIX_FMT_MJPEG) {
- result.appendFormat("camera preview format: %s\n\n", "V4L2_PIX_FMT_MJPEG");
- }
+
+ result.appendFormat("camera preview format: %.4s\n\n",
+ (char *) &vinfo->preview.format.fmt.pix.pixelformat);
+
write(fd, result.string(), result.size());
}