diff options
author | Steve Block <steveblock@google.com> | 2012-01-08 10:19:01 +0000 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2012-01-08 11:03:20 +0000 |
commit | b1fef0d807b86dd730d3ee9b5b5a71afab1649d7 (patch) | |
tree | 85513a6dfcd2415c946861f800fb7ed15d7aa5bb /libs3cjpeg | |
parent | 321520291f1c9db2933110fef6af601a4bbc8b78 (diff) | |
download | device_samsung_crespo-b1fef0d807b86dd730d3ee9b5b5a71afab1649d7.zip device_samsung_crespo-b1fef0d807b86dd730d3ee9b5b5a71afab1649d7.tar.gz device_samsung_crespo-b1fef0d807b86dd730d3ee9b5b5a71afab1649d7.tar.bz2 |
Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/#/c/157220
Bug: 5449033
Change-Id: I03a60758c6dad0d9ecbce42f092a0fe757bd7184
Diffstat (limited to 'libs3cjpeg')
-rw-r--r-- | libs3cjpeg/JpegEncoder.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/libs3cjpeg/JpegEncoder.cpp b/libs3cjpeg/JpegEncoder.cpp index fb70a07..d2b6a6f 100644 --- a/libs3cjpeg/JpegEncoder.cpp +++ b/libs3cjpeg/JpegEncoder.cpp @@ -40,7 +40,7 @@ JpegEncoder::JpegEncoder() : available(false) mDevFd = open(JPG_DRIVER_NAME, O_RDWR); if (mDevFd < 0) { - LOGE("Failed to open the device"); + ALOGE("Failed to open the device"); return; } @@ -52,20 +52,20 @@ JpegEncoder::JpegEncoder() : available(false) 0); if (mArgs.mmapped_addr == MAP_FAILED) { - LOGE("Failed to mmap"); + ALOGE("Failed to mmap"); return; } mArgs.enc_param = new jpg_enc_proc_param; if (mArgs.enc_param == NULL) { - LOGE("Failed to allocate the memory for enc_param"); + ALOGE("Failed to allocate the memory for enc_param"); return; } memset(mArgs.enc_param, 0, sizeof(jpg_enc_proc_param)); mArgs.thumb_enc_param = new jpg_enc_proc_param; if (mArgs.thumb_enc_param == NULL) { - LOGE("Failed to allocate the memory for thumb_enc_param"); + ALOGE("Failed to allocate the memory for thumb_enc_param"); delete mArgs.enc_param; return; } @@ -154,12 +154,12 @@ jpg_return_status JpegEncoder::setConfig(jpeg_conf type, int32_t value) break; default: - LOGE("Invalid Config type"); + ALOGE("Invalid Config type"); ret = ERR_UNKNOWN; } if (ret == JPG_FAIL) - LOGE("Invalid value(%d) for %d type", value, type); + ALOGE("Invalid value(%d) for %d type", value, type); return ret; } @@ -170,7 +170,7 @@ void* JpegEncoder::getInBuf(uint64_t size) return NULL; if (size > JPG_FRAME_BUF_SIZE) { - LOGE("The buffer size requested is too large"); + ALOGE("The buffer size requested is too large"); return NULL; } mArgs.in_buf = (char *)ioctl(mDevFd, IOCTL_JPG_GET_FRMBUF, mArgs.mmapped_addr); @@ -183,7 +183,7 @@ void* JpegEncoder::getOutBuf(uint64_t *size) return NULL; if (mArgs.enc_param->file_size <= 0) { - LOGE("The buffer requested doesn't have data"); + ALOGE("The buffer requested doesn't have data"); return NULL; } mArgs.out_buf = (char *)ioctl(mDevFd, IOCTL_JPG_GET_STRBUF, mArgs.mmapped_addr); @@ -197,7 +197,7 @@ void* JpegEncoder::getThumbInBuf(uint64_t size) return NULL; if (size > JPG_FRAME_THUMB_BUF_SIZE) { - LOGE("The buffer size requested is too large"); + ALOGE("The buffer size requested is too large"); return NULL; } mArgs.in_thumb_buf = (char *)ioctl(mDevFd, IOCTL_JPG_GET_THUMB_FRMBUF, mArgs.mmapped_addr); @@ -210,7 +210,7 @@ void* JpegEncoder::getThumbOutBuf(uint64_t *size) return NULL; if (mArgs.thumb_enc_param->file_size <= 0) { - LOGE("The buffer requested doesn't have data"); + ALOGE("The buffer requested doesn't have data"); return NULL; } mArgs.out_thumb_buf = (char *)ioctl(mDevFd, IOCTL_JPG_GET_THUMB_STRBUF, mArgs.mmapped_addr); @@ -236,7 +236,7 @@ jpg_return_status JpegEncoder::encode(unsigned int *size, exif_attribute_t *exif param->enc_type = JPG_MAIN; ret = (jpg_return_status)ioctl(mDevFd, IOCTL_JPG_ENCODE, &mArgs); if (ret != JPG_SUCCESS) { - LOGE("Failed to encode main image"); + ALOGE("Failed to encode main image"); return ret; } @@ -249,7 +249,7 @@ jpg_return_status JpegEncoder::encode(unsigned int *size, exif_attribute_t *exif if (exifInfo->enableThumb) { ret = encodeThumbImg(&thumbLen); if (ret != JPG_SUCCESS) { - LOGE("Failed to encode for thumbnail image"); + ALOGE("Failed to encode for thumbnail image"); bufSize = EXIF_FILE_SIZE; exifInfo->enableThumb = false; } else { @@ -264,14 +264,14 @@ jpg_return_status JpegEncoder::encode(unsigned int *size, exif_attribute_t *exif exifOut = new unsigned char[bufSize]; if (exifOut == NULL) { - LOGE("Failed to allocate for exifOut"); + ALOGE("Failed to allocate for exifOut"); return ret; } memset(exifOut, 0, bufSize); ret = makeExif (exifOut, exifInfo, &exifLen); if (ret != JPG_SUCCESS) { - LOGE("Failed to make EXIF"); + ALOGE("Failed to make EXIF"); delete[] exifOut; return ret; } @@ -313,7 +313,7 @@ jpg_return_status JpegEncoder::encodeThumbImg(unsigned int *size, bool useMain) if (useMain) { mArgs.in_thumb_buf = (char *)getThumbInBuf(param->width*param->height*2); if (mArgs.in_thumb_buf == NULL) { - LOGE("Failed to get the buffer for thumbnail"); + ALOGE("Failed to get the buffer for thumbnail"); return JPG_FAIL; } @@ -334,7 +334,7 @@ jpg_return_status JpegEncoder::encodeThumbImg(unsigned int *size, bool useMain) mArgs.enc_param->enc_type = JPG_THUMBNAIL; ret = (jpg_return_status)ioctl(mDevFd, IOCTL_JPG_ENCODE, &mArgs); if (ret != JPG_SUCCESS) { - LOGE("Failed to encode for thumbnail"); + ALOGE("Failed to encode for thumbnail"); return JPG_FAIL; } @@ -625,7 +625,7 @@ jpg_return_status JpegEncoder::checkMcu(sample_mode_t sampleMode, break; default: - LOGE("Invaild sample mode"); + ALOGE("Invaild sample mode"); return JPG_FAIL; } @@ -638,7 +638,7 @@ jpg_return_status JpegEncoder::checkMcu(sample_mode_t sampleMode, char *srcBuf, *dstBuf; if ((srcBuf = new char[size]) == NULL) { - LOGE("Failed to allocate for srcBuf"); + ALOGE("Failed to allocate for srcBuf"); return JPG_FAIL; } @@ -662,7 +662,7 @@ bool JpegEncoder::pad(char *srcBuf, uint32_t srcWidth, uint32_t srcHight, return false; if (srcBuf == NULL || dstBuf == NULL) { - LOGE("srcBuf or dstBuf is NULL"); + ALOGE("srcBuf or dstBuf is NULL"); return false; } @@ -671,7 +671,7 @@ bool JpegEncoder::pad(char *srcBuf, uint32_t srcWidth, uint32_t srcHight, if ((int)(dstWidth - srcWidth) < 0 || (int)(dstHight - srcHight) < 0) { - LOGE("dstSize is smaller than srcSize"); + ALOGE("dstSize is smaller than srcSize"); return false; } memset(dstBuf, 0, dstWidth*dstHight * 2); @@ -693,7 +693,7 @@ bool JpegEncoder::scaleDownYuv422(char *srcBuf, uint32_t srcWidth, uint32_t srcH int32_t x, y, src_y_start_pos, dst_pos, src_pos; if (dstWidth % 2 != 0 || dstHight % 2 != 0){ - LOGE("scale_down_yuv422: invalid width, height for scaling"); + ALOGE("scale_down_yuv422: invalid width, height for scaling"); return false; } |