summaryrefslogtreecommitdiffstats
path: root/services/camera/libcameraservice/api1/client2/JpegProcessor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'services/camera/libcameraservice/api1/client2/JpegProcessor.cpp')
-rw-r--r--services/camera/libcameraservice/api1/client2/JpegProcessor.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/services/camera/libcameraservice/api1/client2/JpegProcessor.cpp b/services/camera/libcameraservice/api1/client2/JpegProcessor.cpp
index 77d5c8a..1f4d39b 100644
--- a/services/camera/libcameraservice/api1/client2/JpegProcessor.cpp
+++ b/services/camera/libcameraservice/api1/client2/JpegProcessor.cpp
@@ -233,7 +233,7 @@ status_t JpegProcessor::processNewCapture() {
size_t heapSize = mCaptureHeap->getSize();
if (jpegSize > heapSize) {
ALOGW("%s: JPEG image is larger than expected, truncating "
- "(got %d, expected at most %d bytes)",
+ "(got %zu, expected at most %zu bytes)",
__FUNCTION__, jpegSize, heapSize);
jpegSize = heapSize;
}
@@ -326,13 +326,13 @@ size_t JpegProcessor::findJpegSize(uint8_t* jpegBuffer, size_t maxSize) {
size_t offset = size - MARKER_LENGTH;
uint8_t *end = jpegBuffer + offset;
if (checkJpegStart(jpegBuffer) && checkJpegEnd(end)) {
- ALOGV("Found JPEG transport header, img size %d", size);
+ ALOGV("Found JPEG transport header, img size %zu", size);
return size;
} else {
ALOGW("Found JPEG transport header with bad Image Start/End");
}
} else {
- ALOGW("Found JPEG transport header with bad size %d", size);
+ ALOGW("Found JPEG transport header with bad size %zu", size);
}
}
@@ -348,15 +348,15 @@ size_t JpegProcessor::findJpegSize(uint8_t* jpegBuffer, size_t maxSize) {
segment_t *segment = (segment_t*)(jpegBuffer + size);
uint8_t type = checkJpegMarker(segment->marker);
if (type == 0) { // invalid marker, no more segments, begin JPEG data
- ALOGV("JPEG stream found beginning at offset %d", size);
+ ALOGV("JPEG stream found beginning at offset %zu", size);
break;
}
if (type == EOI || size > maxSize - sizeof(segment_t)) {
- ALOGE("Got premature End before JPEG data, offset %d", size);
+ ALOGE("Got premature End before JPEG data, offset %zu", size);
return 0;
}
size_t length = ntohs(segment->length);
- ALOGV("JFIF Segment, type %x length %x", type, length);
+ ALOGV("JFIF Segment, type %x length %zx", type, length);
size += length + MARKER_LENGTH;
}
@@ -376,10 +376,10 @@ size_t JpegProcessor::findJpegSize(uint8_t* jpegBuffer, size_t maxSize) {
}
if (size > maxSize) {
- ALOGW("JPEG size %d too large, reducing to maxSize %d", size, maxSize);
+ ALOGW("JPEG size %zu too large, reducing to maxSize %zu", size, maxSize);
size = maxSize;
}
- ALOGV("Final JPEG size %d", size);
+ ALOGV("Final JPEG size %zu", size);
return size;
}