summaryrefslogtreecommitdiff
authorGuosong Zhou <guosong.zhou@amlogic.com>2015-08-04 10:22:48 (GMT)
committer Guosong Zhou <guosong.zhou@amlogic.com>2015-08-04 10:22:48 (GMT)
commit2ce6bded0130616eeb61ea279f452969d31f74a5 (patch)
tree83527620c96f0a61cdd6737b03c60ea2bec60401
parent3cdc9688f07bcec6aa4fdfa4e34a8054b77ff222 (diff)
downloadcamera-2ce6bded0130616eeb61ea279f452969d31f74a5.zip
camera-2ce6bded0130616eeb61ea279f452969d31f74a5.tar.gz
camera-2ce6bded0130616eeb61ea279f452969d31f74a5.tar.bz2
PD#107824:fix camera capture crash
Change-Id: Ideeca59fa0cafe214d7566fd634890904147a689
Diffstat
-rw-r--r--[-rwxr-xr-x]v3/fake-pipeline2/JpegCompressor.cpp4
-rw-r--r--[-rwxr-xr-x]v3/fake-pipeline2/JpegCompressor.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/v3/fake-pipeline2/JpegCompressor.cpp b/v3/fake-pipeline2/JpegCompressor.cpp
index 35730b8..cae9f0d 100755..100644
--- a/v3/fake-pipeline2/JpegCompressor.cpp
+++ b/v3/fake-pipeline2/JpegCompressor.cpp
@@ -685,7 +685,7 @@ status_t JpegCompressor::compress() {
enc_params.src = mAuxBuffer.img;
enc_params.src_size = calc_frame_length(mAuxBuffer.format, mAuxBuffer.width, mAuxBuffer.height);
enc_params.dst = mJpegBuffer.img;
- enc_params.dst_size = kMaxJpegSize;
+ enc_params.dst_size = mMaxbufsize;
enc_params.quality = 80;
enc_params.in_width = mAuxBuffer.width;
enc_params.in_height = mAuxBuffer.height;
@@ -707,7 +707,7 @@ status_t JpegCompressor::thumbcompress() {
params enc_params;
enc_params.src = mSrcThumbBuffer;
enc_params.dst = mDstThumbBuffer;
- enc_params.dst_size = kMaxJpegSize;
+ enc_params.dst_size = mInfo.thumbwidth * mInfo.thumbheight * 3;
enc_params.quality = 70;
enc_params.src_size = calc_frame_length(mAuxBuffer.format, mAuxBuffer.width, mAuxBuffer.height);
enc_params.in_width = mAuxBuffer.width;
diff --git a/v3/fake-pipeline2/JpegCompressor.h b/v3/fake-pipeline2/JpegCompressor.h
index affac67..5c61aca 100755..100644
--- a/v3/fake-pipeline2/JpegCompressor.h
+++ b/v3/fake-pipeline2/JpegCompressor.h
@@ -133,7 +133,7 @@ class JpegCompressor: private Thread, public virtual RefBase {
int GenExif(ExifElementsTable* exiftable);
// TODO: Measure this
- static const size_t kMaxJpegSize = 300000;
+ static const size_t kMaxJpegSize = 8000000;
ssize_t mMaxbufsize;
private: