Rearrange source code 26/193026/1 accepted/tizen/unified/20181121.173155 accepted/tizen/unified/20181123.063236 submit/tizen/20181119.072242 submit/tizen/20181121.000755 submit/tizen/20181122.024304
authorjiyong.min <jiyong.min@samsung.com>
Wed, 14 Nov 2018 03:46:30 +0000 (12:46 +0900)
committerjiyong.min <jiyong.min@samsung.com>
Wed, 14 Nov 2018 03:47:09 +0000 (12:47 +0900)
Change-Id: I8c87aca4d32196c6c300c9e387cb31f4c52550e3

common/include/mm_util_color_image.h [deleted file]
common/include/mm_util_common.h [deleted file]
common/include/mm_util_private.h [changed mode: 0755->0644]
common/mm_util_color_image.c [deleted file]
common/mm_util_private.c [changed mode: 0755->0644]
imgp/mm_util_imgp.c
imgp/test/mm_util_imgp_testsuite.c
jpeg/mm_util_jpeg.c [changed mode: 0755->0644]

diff --git a/common/include/mm_util_color_image.h b/common/include/mm_util_color_image.h
deleted file mode 100755 (executable)
index 2d3e6eb..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * libmm-utility
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: YoungHun Kim <yh8004.kim@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#ifndef __MM_UTIL_COLOR_IMAGE_H__
-#define __MM_UTIL_COLOR_IMAGE_H__
-
-#include "mm_util_type.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define IS_MM_UTIL_COLOR_FORMAT(color) mm_util_is_valid_color_format(color)
-
-gboolean mm_util_is_valid_color_format(mm_util_color_format_e color);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif   /*__MM_UTIL_COLOR_IMAGE_H__*/
diff --git a/common/include/mm_util_common.h b/common/include/mm_util_common.h
deleted file mode 100755 (executable)
index 8c004e5..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * libmm-utility
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: YoungHun Kim <yh8004.kim@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#ifndef __MM_UTIL_COMMON_H__
-#define __MM_UTIL_COMMON_H__
-
-#include "mm_util_color_image.h"
-
-
-#endif   /*__MM_UTIL_COMMON_H__*/
old mode 100755 (executable)
new mode 100644 (file)
index 1e530fd..0695f15
@@ -49,6 +49,10 @@ extern "C" {
 #define MM_UTIL_ROUND_DOWN_4(num) ((num)&(~3))
 #define MM_UTIL_ROUND_DOWN_16(num) ((num)&(~15))
 
+#define IS_MM_UTIL_COLOR_FORMAT(color) mm_util_is_valid_color_format(color)
+
+gboolean mm_util_is_valid_color_format(mm_util_color_format_e color);
+
 int mm_util_safe_fopen(const char *path, const char *mode, FILE **fp);
 void mm_util_safe_fclose(FILE *fp);
 
diff --git a/common/mm_util_color_image.c b/common/mm_util_color_image.c
deleted file mode 100755 (executable)
index fa60b06..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * libmm-utility
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: YoungHun Kim <yh8004.kim@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include "mm_util_private.h"
-#include "mm_util_color_image.h"
-
-gboolean mm_util_is_valid_color_format(mm_util_color_format_e color)
-{
-       if ((color < MM_UTIL_COLOR_YUV420) || (color >= MM_UTIL_COLOR_NUM)) {
-               return FALSE;
-       }
-       return TRUE;
-}
old mode 100755 (executable)
new mode 100644 (file)
index b1085d6..57d9bd8
 
 #include "mm_util_private.h"
 
+gboolean mm_util_is_valid_color_format(mm_util_color_format_e color)
+{
+       if ((color < MM_UTIL_COLOR_YUV420) || (color >= MM_UTIL_COLOR_NUM)) {
+               return FALSE;
+       }
+       return TRUE;
+}
+
 int mm_util_safe_fopen(const char *path, const char *mode, FILE **fp)
 {
        char *_realpath = NULL;
index 41d0cd4..0ee4bf4 100755 (executable)
@@ -24,7 +24,6 @@
 #include "mm_util_private.h"
 #include "mm_util_imgp.h"
 #include "mm_util_imgp_internal.h"
-#include "mm_util_common.h"
 
 #define GEN_MASK(x) ((1<<(x))-1)
 #define ROUND_UP_X(v, x) (((v) + GEN_MASK(x)) & ~GEN_MASK(x))
index a70c102..3f721ce 100755 (executable)
@@ -26,7 +26,6 @@
 #include <inttypes.h>
 #include <errno.h>
 #include <mm_util_imgp.h>
-#include <mm_util_common.h>
 #include <limits.h>
 #include <tzplatform_config.h>
 
old mode 100755 (executable)
new mode 100644 (file)
index 3a34ed5..f596d4f
@@ -32,7 +32,6 @@
 #include <glib.h>
 #include "mm_util_jpeg.h"
 #include "mm_util_imgp.h"
-#include "mm_util_common.h"
 #include "mm_util_private.h"
 
 /* maximum width of encoding */
@@ -486,10 +485,7 @@ int mm_util_jpeg_encode_to_file(mm_image_info_s *decoded, int quality, const cha
        mm_util_debug("#START# LIBJPEG");
        FILE *fp = NULL;
        ret = mm_util_safe_fopen(filename, "wb", &fp);
-       if (ret != MM_UTIL_ERROR_NONE) {
-               mm_util_error("mm_util_safe_fopen failed (%d)", ret);
-               return ret;
-       }
+       mm_util_retvm_if(ret != MM_UTIL_ERROR_NONE, ret, "mm_util_safe_fopen fail (%d)", ret);
 
        if (decoded->color == MM_UTIL_COLOR_NV12) {
                unsigned int res_w = 0;
@@ -592,10 +588,7 @@ int mm_util_decode_from_jpeg_file(const char *filename, mm_util_color_format_e f
 
        FILE *fp = NULL;
        ret = mm_util_safe_fopen(filename, "rb", &fp);
-       if (ret != MM_UTIL_ERROR_NONE) {
-               mm_util_error("mm_util_safe_fopen failed (%d)", ret);
-               return ret;
-       }
+       mm_util_retvm_if(ret != MM_UTIL_ERROR_NONE, ret, "mm_util_safe_fopen fail (%d)", ret);
 
        mm_util_debug("#START# libjpeg fmt [%d]", fmt);
        if (fmt == MM_UTIL_COLOR_NV12) {