#define DIV_ROUND_UP_X(v, x) (((v) + GEN_MASK(x)) >> (x))
#define GST "gstcs"
-typedef gboolean(*IMGPInfoFunc) (imgp_info_s *, const unsigned char *, unsigned char *, imgp_plugin_type_e);
+typedef gboolean(*IMGPInfoFunc) (imgp_info_s *, const unsigned char *, unsigned char **, imgp_plugin_type_e);
static int __mm_util_transform_exec(mm_util_s *handle, color_image_data_s *source_image);
static int check_valid_picture_size(int width, int height)
module = g_module_open(PATH_GSTCS_LIB, G_MODULE_BIND_LAZY);
if (module == NULL) {
- mm_util_error("%s | %s module open failed", PATH_NEON_LIB, PATH_GSTCS_LIB);
+ mm_util_error("[%d] %s | %s module open failed", _imgp_plugin_type_e, PATH_NEON_LIB, PATH_GSTCS_LIB);
return NULL;
}
mm_util_debug("module: %p, g_module_name: %s", module, g_module_name(module));
mm_util_debug("plugin type: %d", _imgp_plugin_type_e);
_module = __mm_util_imgp_initialize(_imgp_plugin_type_e);
- mm_util_debug("__mm_util_imgp_initialize: %p", _module);
if (_module == NULL) { /* when IMGP_NEON is NULL */
_imgp_plugin_type_e = IMGP_GSTCS;
goto ERROR;
}
- output_buffer = (unsigned char *) calloc(1, output_buffer_size);
- if (output_buffer == NULL) {
- mm_util_error("memory allocation failed");
- ret = MM_UTIL_ERROR_OUT_OF_MEMORY;
- goto ERROR;
- }
- mm_util_debug("memory allocation outputbuffer: %p (%d)", output_buffer, output_buffer_size);
-
- ret = _mm_util_imgp_func(_imgp_info_s, src, output_buffer, IMGP_CSC);
+ ret = _mm_util_imgp_func(_imgp_info_s, src, &output_buffer, IMGP_CSC);
if (ret != MM_UTIL_ERROR_NONE) {
mm_util_error("image processing failed");
goto ERROR;
goto ERROR;
}
- output_buffer = (unsigned char *) calloc(1, output_buffer_size);
- if (output_buffer == NULL) {
- mm_util_error("memory allocation failed");
- ret = MM_UTIL_ERROR_OUT_OF_MEMORY;
- goto ERROR;
- }
-
- mm_util_debug("memory allocation outputbuffer: %p (%d)", output_buffer, output_buffer_size);
-
- ret = _mm_util_imgp_func(_imgp_info_s, src, output_buffer, IMGP_RSZ);
+ ret = _mm_util_imgp_func(_imgp_info_s, src, &output_buffer, IMGP_RSZ);
mm_util_debug("_mm_util_imgp_func, ret: %d", ret);
if (ret != MM_UTIL_ERROR_NONE) {
mm_util_error("image processing failed");
goto ERROR;
}
- output_buffer = (unsigned char *) calloc(1, output_buffer_size);
- if (output_buffer == NULL) {
- mm_util_error("memory allocation failed");
- ret = MM_UTIL_ERROR_OUT_OF_MEMORY;
- goto ERROR;
- }
-
- mm_util_debug("memory allocation outputbuffer: %p (%d)", output_buffer, output_buffer_size);
-
- ret = _mm_util_imgp_func(_imgp_info_s, src, output_buffer, IMGP_ROT);
+ ret = _mm_util_imgp_func(_imgp_info_s, src, &output_buffer, IMGP_ROT);
if (ret != MM_UTIL_ERROR_NONE) {
mm_util_error("image processing failed");
goto ERROR;