Optimize dcm service 30/55030/3 accepted/tizen/mobile/20151222.024518 accepted/tizen/tv/20151222.024547 accepted/tizen/wearable/20151222.024608 submit/tizen/20151222.022300 submit/tizen_common/20151229.142028 submit/tizen_common/20151229.144031 submit/tizen_common/20151229.154718
authorJi Yong Min <jiyong.min@samsung.com>
Mon, 21 Dec 2015 10:16:41 +0000 (19:16 +0900)
committerJi Yong Min <jiyong.min@samsung.com>
Mon, 21 Dec 2015 10:44:30 +0000 (19:44 +0900)
- Reduce memory usage by using RGB888 image format when JPEG is decoded
- Ready to enhance performance by using image resizing for big size image

Change-Id: Idf442de2add6ded01ade6a2e389c3689013fc6d2
Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
12 files changed:
include/DcmTypes.h
libdcm-face/dcm-face.c
libdcm-face/dcm-face_mediavision.c
libdcm-face/dcm-face_priv.h
libdcm-face/include/dcm-face.h
libdcm-util/dcm_image_codec.cpp
libdcm-util/include/dcm_image_codec.h
packaging/dcm-service.spec
src/DcmDbUtils.cpp
src/DcmFaceUtils.cpp
src/DcmIpcUtils.cpp
src/DcmScanSvc.cpp

index 904d07ec236af92dc796a67140e53f68e539745c..c68ab60fcfbf03dfb262631f69be1d202786cc9d 100755 (executable)
@@ -129,12 +129,13 @@ typedef struct {
 
 typedef enum {
        DCM_SVC_I420,
-       DCM_SVC_RGB888,
+       DCM_SVC_RGB,
+       DCM_SVC_RGBA,
 } DcmImageDecodeType;
 
 typedef struct {
        unsigned char *pixel;           /* decoding results, must be freed after use */
-       unsigned int size;
+       unsigned long long size;
        int orientation;                        /* orientation information extracted from exif */
        unsigned int original_width;                    /* original image width */
        unsigned int original_height;           /* original image height */
index 57dda457460c4defd0b4c973fca36f74f53fdc7c..729fcbb6e23b62322a070cdb388df54bf49e675f 100755 (executable)
@@ -72,17 +72,7 @@ EXPORT_API int dcm_face_destroy(__in dcm_face_h handle)
        return ret;
 }
 
-EXPORT_API int dcm_face_get_prefered_colorspace(__in dcm_face_h handle, __out face_image_colorspace_e *colorspace)
-{
-       dcm_retvm_if(handle == NULL, FACE_ERROR_INVALID_PARAMTER, "Invalid handle");
-       dcm_retvm_if(colorspace == NULL, FACE_ERROR_INVALID_PARAMTER, "Invalid colorspace");
-
-       *colorspace = FACE_IMAGE_COLORSPACE_RGB888;
-
-       return FACE_ERROR_NONE;
-}
-
-EXPORT_API int dcm_face_set_image_info(dcm_face_h handle, face_image_colorspace_e colorspace, unsigned char *buffer, unsigned int width, unsigned int height, unsigned int size)
+EXPORT_API int dcm_face_set_image_info(dcm_face_h handle, face_image_colorspace_e colorspace, unsigned char *buffer, unsigned int width, unsigned int height, unsigned long long size)
 {
        FaceHandleT *_handle = (FaceHandleT *)handle;
        unsigned char *data = NULL;
@@ -97,6 +87,10 @@ EXPORT_API int dcm_face_set_image_info(dcm_face_h handle, face_image_colorspace_
        case FACE_IMAGE_COLORSPACE_RGB888:
        case FACE_IMAGE_COLORSPACE_RGBA:
                data = (unsigned char *)calloc(1, size);
+               if (data == NULL) {
+                       dcm_error("Not allocate memory");
+                       return FACE_ERROR_OUT_OF_MEMORY;
+               }
                memcpy(data, buffer, size);
                break;
        default:
index b93d8c1fc88f8f0d1288aa0795643e4421073c41..c181d47c5f5ec25b4b0dbc31941b711ca386ac9b 100755 (executable)
@@ -196,7 +196,7 @@ int _face_detect_faces(__in dcm_face_h handle, __out face_rect_s *face_rect[], _
 
        dcm_debug("face_detect image: %p, size: %d, width: %d, height: %d, color: %d", handle->image_info->data, handle->image_info->size, handle->image_info->width, handle->image_info->height, colorspace);
 
-       err = mv_source_fill_by_buffer(_fengine->source, handle->image_info->data, handle->image_info->size, handle->image_info->width, handle->image_info->height, colorspace);
+       err = mv_source_fill_by_buffer(_fengine->source, handle->image_info->data, (unsigned int)(handle->image_info->size), handle->image_info->width, handle->image_info->height, colorspace);
        if (err != MEDIA_VISION_ERROR_NONE) {
                dcm_error("Fail to mv_source_fill_by_buffer");
                return __convert_to_mv_error_e(err);
index 4dd6a23a4728067aaaf1ff8bae8f553b856cd865..797984dafef87f959d3dd02fb463bb97d99e8345 100755 (executable)
@@ -38,7 +38,7 @@ typedef struct face_image_s {
        unsigned char *data;
        unsigned int width;
        unsigned int height;
-       unsigned int size;
+       unsigned long long size;
        face_image_colorspace_e colorspace;
        unsigned int magic;
 } FaceImage;
index 9797dc3905df20fdec1f3fc02bf4b9e86f83ecd1..177e96001e37444a6e5d729aa192b12c757c3010 100755 (executable)
@@ -80,7 +80,7 @@ int dcm_face_get_prefered_colorspace(dcm_face_h handle, face_image_colorspace_e
  * @retval #FACE_ERROR_OUT_OF_MEMORY   Out of memory
  * @see dcm_face_create()
  */
-int dcm_face_set_image_info(dcm_face_h handle, face_image_colorspace_e colorspace, unsigned char *buffer, unsigned int width, unsigned int height, unsigned int size);
+int dcm_face_set_image_info(dcm_face_h handle, face_image_colorspace_e colorspace, unsigned char *buffer, unsigned int width, unsigned int height, unsigned long long size);
 
 /**
  * @brief Gets the face information of detected faces.
index 650a41ae31785dcba45b7376e4de6e18a220d71f..01ffc396db1f507a5c1fb6d61c7c963840221ae5 100755 (executable)
@@ -28,8 +28,8 @@
 #define MIME_TYPE_PNG "image/png"
 #define MIME_TYPE_BMP "image/bmp"
 
-#define OPT_IMAGE_WIDTH                2048
-#define OPT_IMAGE_HEIGHT       1536
+#define OPT_IMAGE_WIDTH                1280
+#define OPT_IMAGE_HEIGHT       720
 
 static void _dcm_get_optimized_wh(unsigned int src_width, unsigned int src_height, unsigned int *calc_width, unsigned int *calc_height)
 {
@@ -52,7 +52,7 @@ static void _dcm_get_optimized_wh(unsigned int src_width, unsigned int src_heigh
        }
 }
 
-static int _dcm_rotate_image(const unsigned char *source, unsigned char **image_buffer, unsigned int *buff_width, unsigned int *buff_height, dcm_image_codec_type_e decode_type, int orientation)
+static int _dcm_rotate_image(const unsigned char *source, const dcm_image_format_e format, const int orientation, unsigned char **image_buffer, unsigned long long *size, unsigned int *buff_width, unsigned int *buff_height)
 {
        int ret = IMAGE_UTIL_ERROR_NONE;
        image_util_colorspace_e colorspace = IMAGE_UTIL_COLORSPACE_RGBA8888;
@@ -63,22 +63,22 @@ static int _dcm_rotate_image(const unsigned char *source, unsigned char **image_
 
        DCM_CHECK_VAL(source, DCM_ERROR_INVALID_PARAMETER);
 
-       if (decode_type == DCM_IMAGE_CODEC_I420) {
+       if (format == DCM_IMAGE_FORMAT_I420) {
                colorspace = IMAGE_UTIL_COLORSPACE_I420;
-       } else if (decode_type == DCM_IMAGE_CODEC_RGB) {
+       } else if (format == DCM_IMAGE_FORMAT_RGB) {
                colorspace = IMAGE_UTIL_COLORSPACE_RGB888;
-       } else if (decode_type == DCM_IMAGE_CODEC_RGBA) {
+       } else if (format == DCM_IMAGE_FORMAT_RGBA) {
                colorspace = IMAGE_UTIL_COLORSPACE_RGBA8888;
        } else {
                return DCM_ERROR_UNSUPPORTED_IMAGE_TYPE;
        }
 
        /* Get rotate angle enum */
-       if (orientation == DEGREE_180) { // 3-180
+       if (orientation == DEGREE_180) {
                rotate = IMAGE_UTIL_ROTATION_180;
-       } else if (orientation == DEGREE_90) { // 6-90
+       } else if (orientation == DEGREE_90) {
                rotate = IMAGE_UTIL_ROTATION_90;
-       } else if (orientation == DEGREE_270) { // 8-270
+       } else if (orientation == DEGREE_270) {
                rotate = IMAGE_UTIL_ROTATION_270;
        } else {
                rotate = IMAGE_UTIL_ROTATION_NONE;
@@ -114,8 +114,10 @@ static int _dcm_rotate_image(const unsigned char *source, unsigned char **image_
                return DCM_ERROR_IMAGE_UTIL_FAILED;
        }
 
+       *size = rotated_buffer_size;
+
        try {
-               /* Rotate input bitmap */
+               /* Rotate input buffer */
                ret = image_util_rotate(rotated_buffer, &rotated_width, &rotated_height, rotate, source,
                *buff_width, *buff_height, colorspace);
 
@@ -129,7 +131,7 @@ static int _dcm_rotate_image(const unsigned char *source, unsigned char **image_
                *buff_width = rotated_width;
                *buff_height = rotated_height;
 
-               /* Allocated pixel should be freed when scanning is finished for this rotated bitmap */
+               /* Allocated data should be freed when scanning is finished for this rotated image */
                *image_buffer = rotated_buffer;
                dcm_warn("rotated decode buffer: %p", *image_buffer);
 
@@ -142,17 +144,18 @@ static int _dcm_rotate_image(const unsigned char *source, unsigned char **image_
        return DCM_SUCCESS;
 }
 
-int dcm_decode_image(const char *file_path,
-       dcm_image_codec_type_e decode_type, const char* mimne_type, bool resize,
-       unsigned char **image_buffer, unsigned int *buff_width, unsigned int *buff_height,
-       int orientation, unsigned int *size)
+int dcm_decode_image(const char *file_path, const dcm_image_format_e format,
+       const char* mimne_type, const int orientation, const bool resize,
+       unsigned char **image_buffer, unsigned long long *size,
+       unsigned int *buff_width, unsigned int *buff_height)
 {
        int ret = IMAGE_UTIL_ERROR_NONE;
        image_util_colorspace_e colorspace = IMAGE_UTIL_COLORSPACE_RGBA8888;
+       mm_util_img_format mm_format = MM_UTIL_IMG_FMT_RGBA8888;
        unsigned char *decode_buffer = NULL;
        unsigned int decode_width = 0, decode_height = 0;
        unsigned char *resize_buffer = NULL;
-       unsigned int resize_buffer_size = 0;
+       unsigned int buffer_size = 0;
        image_util_decode_h handle = NULL;
 
        dcm_debug_fenter();
@@ -165,30 +168,30 @@ int dcm_decode_image(const char *file_path,
                return DCM_ERROR_IMAGE_UTIL_FAILED;
        }
 
-       if (strcmp(mimne_type, MIME_TYPE_PNG) == 0) {
-               DCM_CHECK_VAL((decode_type != DCM_IMAGE_CODEC_RGBA), DCM_ERROR_UNSUPPORTED_IMAGE_TYPE);
-       } else if (strcmp(mimne_type, MIME_TYPE_BMP) == 0) {
-               DCM_CHECK_VAL((decode_type != DCM_IMAGE_CODEC_RGBA), DCM_ERROR_UNSUPPORTED_IMAGE_TYPE);
-       } else if (strcmp(mimne_type, MIME_TYPE_JPEG) == 0) {
-               if (decode_type == DCM_IMAGE_CODEC_I420) {
+       ret = image_util_decode_set_input_path(handle, file_path);
+       if (ret != IMAGE_UTIL_ERROR_NONE) {
+               dcm_error("Error image_util_decode_set_input_path ret : %d", ret);
+               return DCM_ERROR_IMAGE_UTIL_FAILED;
+       }
+
+       if (strcmp(mimne_type, MIME_TYPE_JPEG) == 0) {
+               if (format == DCM_IMAGE_FORMAT_I420) {
                        colorspace = IMAGE_UTIL_COLORSPACE_I420;
-               } else if (decode_type == DCM_IMAGE_CODEC_RGB) {
+                       mm_format = MM_UTIL_IMG_FMT_I420;
+               } else if (format == DCM_IMAGE_FORMAT_RGB) {
                        colorspace = IMAGE_UTIL_COLORSPACE_RGB888;
-               } else if (decode_type == DCM_IMAGE_CODEC_RGBA) {
+                       mm_format = MM_UTIL_IMG_FMT_RGB888;
+               } else if (format == DCM_IMAGE_FORMAT_RGBA) {
                        colorspace = IMAGE_UTIL_COLORSPACE_RGBA8888;
+                       mm_format = MM_UTIL_IMG_FMT_RGBA8888;
                } else {
                        return DCM_ERROR_UNSUPPORTED_IMAGE_TYPE;
                }
                ret = image_util_decode_set_colorspace(handle, colorspace);
-       } else {
-               dcm_error("Failed not supported mime type! (%s)", mimne_type);
-               return DCM_ERROR_INVALID_PARAMETER;
-       }
-
-       ret = image_util_decode_set_input_path(handle, file_path);
-       if (ret != IMAGE_UTIL_ERROR_NONE) {
-               dcm_error("Error image_util_decode_set_input_path ret : %d", ret);
-               return DCM_ERROR_IMAGE_UTIL_FAILED;
+               if (ret != IMAGE_UTIL_ERROR_NONE) {
+                       dcm_error("Error image_util_decode_set_colorspace ret : %d", ret);
+                       return DCM_ERROR_IMAGE_UTIL_FAILED;
+               }
        }
 
        ret = image_util_decode_set_output_buffer(handle, &decode_buffer);
@@ -197,7 +200,7 @@ int dcm_decode_image(const char *file_path,
                return DCM_ERROR_IMAGE_UTIL_FAILED;
        }
 
-       ret = image_util_decode_run(handle, (unsigned long *)&decode_width, (unsigned long *)&decode_height, (unsigned long long *)size);
+       ret = image_util_decode_run(handle, (unsigned long *)&decode_width, (unsigned long *)&decode_height, size);
        if (ret != IMAGE_UTIL_ERROR_NONE) {
                dcm_error("Error image_util_decode_run ret : %d", ret);
                return DCM_ERROR_IMAGE_UTIL_FAILED;
@@ -220,13 +223,16 @@ int dcm_decode_image(const char *file_path,
 
        /* Resize the big size image to enhance performance for big size image */
        if ((decode_width != *buff_width) || (decode_height != *buff_height)) {
-               ret = image_util_calculate_buffer_size(*buff_width, *buff_height, colorspace, &resize_buffer_size);
+               ret = image_util_calculate_buffer_size(*buff_width, *buff_height, colorspace, &buffer_size);
                if (ret != DCM_SUCCESS) {
                        dcm_error("Failed to calculate image buffer size! err: %d", ret);
                        return DCM_ERROR_CODEC_DECODE_FAILED;
                }
-               resize_buffer = (unsigned char *)malloc(sizeof(unsigned char) * (resize_buffer_size));
-               mm_util_resize_image(decode_buffer, decode_width, decode_height, MM_UTIL_IMG_FMT_RGBA8888, resize_buffer, buff_width, buff_height);
+               *size = buffer_size;
+               resize_buffer = (unsigned char *)malloc(sizeof(unsigned char) * (buffer_size));
+               if (resize_buffer != NULL) {
+                       mm_util_resize_image(decode_buffer, decode_width, decode_height, mm_format, resize_buffer, buff_width, buff_height);
+               }
        } else {
                resize_buffer = decode_buffer;
        }
@@ -235,7 +241,7 @@ int dcm_decode_image(const char *file_path,
        if (orientation == 0) {
                *image_buffer = resize_buffer;
        } else {
-               ret = _dcm_rotate_image(resize_buffer, image_buffer, buff_width, buff_height, decode_type, orientation);
+               ret = _dcm_rotate_image(resize_buffer, format, orientation, image_buffer, size, buff_width, buff_height);
                if (ret != DCM_SUCCESS) {
                        dcm_error("Failed to rotate image buffer! err: %d", ret);
                        return DCM_ERROR_CODEC_DECODE_FAILED;
index 0281a72ac413772c97b7387669becf23faf11bff..7a0a7e484574b9d34c0b671e2a95d0e05e2ed75a 100755 (executable)
@@ -28,10 +28,10 @@ extern "C" {
 #endif
 
 typedef enum {
-       DCM_IMAGE_CODEC_I420,
-       DCM_IMAGE_CODEC_RGB,
-       DCM_IMAGE_CODEC_RGBA,
-} dcm_image_codec_type_e;
+       DCM_IMAGE_FORMAT_I420,
+       DCM_IMAGE_FORMAT_RGB,
+       DCM_IMAGE_FORMAT_RGBA,
+} dcm_image_format_e;
 
 typedef struct {
        int size;
@@ -44,9 +44,10 @@ typedef struct {
 } dcm_image_info;
 
 
-int dcm_decode_image(const char *file_path,    dcm_image_codec_type_e decode_type, const char* mimne_type,
-       bool resize, unsigned char **image_buffer, unsigned int *buff_width, unsigned int *buff_height,
-       int orientation, unsigned int *size);
+int dcm_decode_image(const char *file_path, const dcm_image_format_e format,
+       const char* mimne_type, const int orientation, const bool resize,
+       unsigned char **image_buffer, unsigned long long *size,
+       unsigned int *buff_width, unsigned int *buff_height);
 
 #ifdef __cplusplus
 }
index 3c3e068a24620a7cca3fd7905524966b96121baa..1af871cb9b7422a5b46afdecef2f8f7ee7269c6d 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       dcm-service
 Summary:    Multimedia DCM(Digital Contents Management) Service
-Version:    0.0.2
+Version:    0.0.3
 Release:    0
 Group:      Multimedia/Service
 License:    Apache-2.0
index 380db02d89898326b25435f3083613175f56be37..272135237d691e44c813c7994bbfb29746361388 100755 (executable)
@@ -482,7 +482,7 @@ int DcmDbUtils::_dcm_svc_db_update_color_to_db(DcmColorItem color)
        char* query_string = NULL;
 
        dcm_debug_fenter();
-
+#if 0
        DCM_CHECK_VAL(db_handle, DCM_ERROR_INVALID_PARAMETER);
        DCM_CHECK_VAL(color.media_uuid, DCM_ERROR_INVALID_PARAMETER);
        DCM_CHECK_VAL(color.storage_uuid, DCM_ERROR_INVALID_PARAMETER);
@@ -499,7 +499,7 @@ int DcmDbUtils::_dcm_svc_db_update_color_to_db(DcmColorItem color)
        g_mutex_unlock(&gMutexLock);
 
        DCM_SQLITE3_FREE(query_string);
-
+#endif
        dcm_debug_fleave();
 
        return ret;
index 4ff22d6737dbd57e894b86b8f0609669067aea1d..77a9f7121177b63e72f0dff8e8fa5323fc71e855 100755 (executable)
@@ -96,19 +96,9 @@ int DcmFaceUtils::runFaceRecognizeProcess(DcmScanItem *scan_item, DcmImageInfo *
        DCM_CHECK_VAL(image_info, DCM_ERROR_INVALID_PARAMETER);
        DCM_CHECK_VAL(image_info->pixel, DCM_ERROR_INVALID_PARAMETER);
 
-       /* Create image buffer used for face detection */
-       face_image_colorspace_e prefered_colorspace = FACE_IMAGE_COLORSPACE_RGB888;
+       dcm_debug("colorspce: [%d], w: [%d], h: [%d]", image_info->decode_type, image_info->buffer_width, image_info->buffer_height);
 
-       err = dcm_face_get_prefered_colorspace(dcm_face_handle, &prefered_colorspace);
-       if (err != FACE_ERROR_NONE) {
-               dcm_error("Failed to create face_image! err: %d", err);
-               ret = DCM_ERROR_FACE_ENGINE_FAILED;
-               goto DCM_SVC_FACE_RECOGNIZE_BUFFER_FAILED;
-       }
-
-       dcm_debug("colorspce: [%d], w: [%d], h: [%d]", prefered_colorspace, image_info->buffer_width, image_info->buffer_height);
-
-       err = dcm_face_set_image_info(dcm_face_handle, prefered_colorspace, image_info->pixel, image_info->buffer_width, image_info->buffer_height, image_info->size);
+       err = dcm_face_set_image_info(dcm_face_handle, (face_image_colorspace_e)image_info->decode_type, image_info->pixel, image_info->buffer_width, image_info->buffer_height, image_info->size);
        if (err != FACE_ERROR_NONE) {
                dcm_error("Failed to dcm_face_set_image_info! err: %d", err);
                ret = DCM_ERROR_FACE_ENGINE_FAILED;
index f90666bb81e06589d7df4d2198c31b6dba1d636e..f911466fae8ea444872f5df6d0bd6266d32556e5 100755 (executable)
@@ -33,7 +33,7 @@
 #include <DcmTypes.h>
 #include <DcmDebugUtils.h>
 
-static char DCM_IPC_PATH[5][100] =
+static char DCM_IPC_PATH[][100] =
                        {"/var/run/media-server/dcm_ipc_scanthread_recv",
                         "/var/run/media-server/dcm_ipc_thumbserver_comm_recv",
                         "/var/run/media-server/media_ipc_thumbdcm_dcmrecv"};
index 62f0afec76a99046aa7d81c0cfcc80d4357becd6..8b9f87e79f71416d8ce95aa076af7e8f2151c931 100755 (executable)
@@ -260,7 +260,7 @@ int DcmScanSvc::runScanProcess(DcmScanItem *scan_item)
 
        DcmImageInfo image_info = {0, };
        memset(&image_info, 0, sizeof(DcmImageInfo));
-       dcm_image_codec_type_e image_format = DCM_IMAGE_CODEC_RGBA;
+       dcm_image_format_e image_format = DCM_IMAGE_FORMAT_I420;
 
        /* Process scan operation if the file exists */
        if (g_file_test(scan_item->file_path, (GFileTest)(G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR)) == TRUE) {
@@ -304,31 +304,34 @@ int DcmScanSvc::runScanProcess(DcmScanItem *scan_item)
                        dcm_debug("ImgGetImageInfo type: %d, width: %d, height: %d", type, image_info.original_width, image_info.original_height);
                }
 
-               if ((strcmp(scan_item->mime_type, MIME_TYPE_JPEG) == 0) ||
-                       (strcmp(scan_item->mime_type, MIME_TYPE_PNG) == 0) ||
-                       (strcmp(scan_item->mime_type, MIME_TYPE_BMP) == 0)) {
-                       ret = dcm_decode_image((const char *) (scan_item->file_path),
-                               image_format, scan_item->mime_type, FALSE, &(image_info.pixel),
-                               &(image_info.buffer_width), &(image_info.buffer_height), image_info.orientation, &(image_info.size));
-                       if (ret != DCM_SUCCESS) {
-                               dcm_error("Failed dcm_decode_image! err: %d", ret);
-                               return ret;
-                       }
+               if (strcmp(scan_item->mime_type, MIME_TYPE_JPEG) == 0) {
+                       image_format = DCM_IMAGE_FORMAT_RGB;
+               } else if (strcmp(scan_item->mime_type, MIME_TYPE_PNG) == 0) {
+                       image_format = DCM_IMAGE_FORMAT_RGBA;
+               } else if (strcmp(scan_item->mime_type, MIME_TYPE_BMP) == 0) {
+                       image_format = DCM_IMAGE_FORMAT_RGBA;
                } else {
                        dcm_error("Failed not supported type! (%s)", scan_item->mime_type);
                        return DCM_ERROR_INVALID_PARAMETER;
                }
 
+               ret = dcm_decode_image((const char *) (scan_item->file_path), image_format, scan_item->mime_type,
+                       image_info.orientation, FALSE, &(image_info.pixel), &(image_info.size),
+                       &(image_info.buffer_width), &(image_info.buffer_height));
+               if (ret != DCM_SUCCESS) {
+                       dcm_error("Failed dcm_decode_image! err: %d", ret);
+                       return ret;
+               }
+
                image_info.decode_type = (DcmImageDecodeType)image_format;
 
-               dcm_debug("Image info width: %d, height: %d, buf_width: %d, buf_height: %d, orientation: %d",
-                       image_info.original_width, image_info.original_height, image_info.buffer_width, image_info.buffer_height, image_info.orientation);
+               dcm_debug("Image info width: %d, height: %d, buf_width: %d, buf_height: %d",
+                       image_info.original_width, image_info.original_height, image_info.buffer_width, image_info.buffer_height);
 
                /* Process face scan */
                ret = DcmFaceUtils::runFaceRecognizeProcess(scan_item, &image_info);
-               if (ret != DCM_SUCCESS) {
+               if (ret != DCM_SUCCESS)
                        dcm_error("Failed to process face detection! err: %d", ret);
-               }
 
 #if 0
                /* Process color extract */