_imgp_info_s->buffer_size = 0;
_imgp_info_s->angle = angle;
- mm_util_debug("width: %d height: %d width: %d height: %d rotation_value: %d", _imgp_info_s->src_width, _imgp_info_s->src_height, _imgp_info_s->dst_width, _imgp_info_s->dst_height, _imgp_info_s->angle);
+ mm_util_debug("src_width[%u] src_height[%u] dst_width[%u] dst_height[%u] rotation_value[%d]", _imgp_info_s->src_width, _imgp_info_s->src_height, _imgp_info_s->dst_width, _imgp_info_s->dst_height, _imgp_info_s->angle);
return ret;
}
mm_util_retvm_if((__mm_util_check_format(src_format) == FALSE), MM_UTIL_ERROR_NOT_SUPPORTED_FORMAT, "not supported src_format [%d]", src_format);
mm_util_retvm_if((__mm_util_check_format(dst_format) == FALSE), MM_UTIL_ERROR_NOT_SUPPORTED_FORMAT, "not supported dst_format [%d]", dst_format);
- mm_util_debug("src_width [%d] src_height [%d] src_format[%d]", src_width, src_height, src_format);
+ mm_util_debug("src_width [%d] src_height [%d] src_format[%d] dst_format[%d]", src_width, src_height, src_format, dst_format);
_mm_util_imgp_func = __mm_util_initialize(IMGP_CSC, src_format, dst_format, &_module);
if (_mm_util_imgp_func == NULL) {
}
/* Output result*/
- mm_util_debug("dst: %p dst_width: %d, dst_height: %d, output_stride: %d, output_elevation: %d",
+ mm_util_debug("dst[%p] dst_width[%u] dst_height[%u] output_stride[%u] output_elevation[%u]",
dst, _imgp_info_s->dst_width, _imgp_info_s->dst_height, _imgp_info_s->output_stride, _imgp_info_s->output_elevation);
ERROR:
mm_util_retvm_if((crop_start_x + *crop_dest_width > src_width), MM_UTIL_ERROR_INVALID_PARAMETER, "invalid position [%d]]", crop_start_x);
mm_util_retvm_if((crop_start_y + *crop_dest_height > src_height), MM_UTIL_ERROR_INVALID_PARAMETER, "invalid position [%d]", crop_start_y);
- mm_util_debug("[Input] src: [%p] src_width: [%ui] src_height: [%ui] src_format: [%d] crop_start_x: [%ui] crop_start_y: [%ui] crop_dest_width: [%ui] crop_dest_height: [%ui]",
+ mm_util_debug("[Input] src[%p] src_width[%u] src_height[%u] src_format[%d] crop_start_x[%u] crop_start_y[%u] crop_dest_width[%u] crop_dest_height[%u]",
src, src_width, src_height, src_format, crop_start_x, crop_start_y, *crop_dest_width, *crop_dest_height);
switch (src_format) {
fprintf(stderr, "command: %s src_width: %d, src_height: %d, src_format: %d, dst_width: %d, dst_height: %d, dst_format:%d, rotation:%d\n", command, src_width, src_height, src_format, dst_width, dst_height, dst_format, rotation);
+ if (strcmp(command, "convert") == 0) {
+ if ((src_width != dst_width) || (src_width != dst_width)) {
+ fprintf(stderr, "Wrong input. dst w/h should be same as src w/h\n");
+ return 0;
+ }
+ }
+
/* mem allocation for src dst buffer */
mm_util_get_image_size(src_format, src_width, src_height, &size);
src_size = (size_t)size;