#else
mm_util_debug("#START# LIBJPEG");
if (fmt == MM_UTIL_COLOR_NV12) {
- unsigned int dst_size = 0;
+ size_t dst_size = 0;
ret = mm_util_get_image_size(MM_UTIL_COLOR_NV12, (unsigned int)width, (unsigned int)height, &dst_size);
unsigned char *dst = NULL;
dst = calloc(1, dst_size);
#else /* LIBJPEG_TURBO */
mm_util_debug("#START# libjpeg");
if (fmt == MM_UTIL_COLOR_NV12) {
- unsigned int dst_size = 0;
+ size_t dst_size = 0;
ret = mm_util_get_image_size(MM_UTIL_COLOR_NV12, (unsigned int)width, (unsigned int)height, &dst_size);
unsigned char *dst = NULL;
dst = calloc(1, dst_size);
#else
mm_util_debug("#START# libjpeg(fmt:%d)", fmt);
if (fmt == MM_UTIL_COLOR_NV12) {
- unsigned int dst_size = 0;
+ size_t dst_size = 0;
ret = __mm_image_decode_from_jpeg_file_with_libjpeg(decoded, filename, MM_UTIL_COLOR_YUV420, MM_UTIL_JPEG_DECODE_DOWNSCALE_1_1);
if (ret == MM_UTIL_ERROR_NONE) {
int err = MM_UTIL_ERROR_NONE;
return MM_UTIL_ERROR_OUT_OF_MEMORY;
}
memcpy(decoded->data, dst, dst_size);
- decoded->size = dst_size;
+ decoded->size = (unsigned int)dst_size;
MMUTIL_SAFE_FREE(dst);
} else {
mm_util_debug("memory allocation failed");
#else
mm_util_debug("#START# libjpeg");
if (fmt == MM_UTIL_COLOR_NV12) {
- unsigned int dst_size = 0;
+ size_t dst_size = 0;
unsigned char *dst = NULL;
ret = __mm_image_decode_from_jpeg_memory_with_libjpeg(decoded, src, size, MM_UTIL_COLOR_YUV420, MM_UTIL_JPEG_DECODE_DOWNSCALE_1_1);
return MM_UTIL_ERROR_OUT_OF_MEMORY;
}
memcpy(decoded->data, dst, dst_size);
- decoded->size = dst_size;
+ decoded->size = (unsigned int)dst_size;
MMUTIL_SAFE_FREE(dst);
} else {
mm_util_debug("memory allocation failed");
return MM_UTIL_ERROR_OUT_OF_MEMORY;
}
memcpy(decoded->data, dst, dst_size);
- decoded->size = dst_size;
+ decoded->size = (unsigned int)dst_size;
MMUTIL_SAFE_FREE(dst);
} else {
mm_util_debug("memory allocation failed");
#else
mm_util_debug("#START# libjpeg");
if (fmt == MM_UTIL_COLOR_NV12) {
- unsigned int dst_size = 0;
+ size_t dst_size = 0;
unsigned char *dst = NULL;
ret = __mm_image_decode_from_jpeg_memory_with_libjpeg(decoded, src, size, MM_UTIL_COLOR_YUV420, downscale);
return MM_UTIL_ERROR_OUT_OF_MEMORY;
}
memcpy(decoded->data, dst, dst_size);
- decoded->size = dst_size;
+ decoded->size = (unsigned int)dst_size;
MMUTIL_SAFE_FREE(dst);
} else {
mm_util_debug("memory allocation failed");