+++ /dev/null
-/*
- * 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__*/
+++ /dev/null
-/*
- * 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__*/
#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);
+++ /dev/null
-/*
- * 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;
-}
#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;
#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))
#include <inttypes.h>
#include <errno.h>
#include <mm_util_imgp.h>
-#include <mm_util_common.h>
#include <limits.h>
#include <tzplatform_config.h>
#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 */
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;
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) {