From 544618ec2ea323ef0c671d4d35c0934888afc484 Mon Sep 17 00:00:00 2001 From: hj kim Date: Fri, 12 Oct 2018 08:47:41 +0900 Subject: [PATCH] Fix typo and change image_util_frame_create to use image_util_encode_h Change-Id: Id505ca13afd55b40f679daa34904782a9fd4f5cd --- include/image_util_decode.h | 4 ++-- include/image_util_internal.h | 2 +- src/image_util_decode.c | 4 ++-- src/image_util_internal.c | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/image_util_decode.h b/include/image_util_decode.h index c53b614..5d89fc7 100755 --- a/include/image_util_decode.h +++ b/include/image_util_decode.h @@ -188,7 +188,7 @@ int image_util_decode_set_output_buffer(image_util_decode_h handle, unsigned cha * @see image_util_decode_run_async() * @see image_util_decode_destroy() */ -int image_util_decode_set_colorspace(image_util_encode_h handle, image_util_colorspace_e colorspace); +int image_util_decode_set_colorspace(image_util_decode_h handle, image_util_colorspace_e colorspace); /** * @brief Sets the downscale value at which JPEG image should be decoded. @@ -220,7 +220,7 @@ int image_util_decode_set_colorspace(image_util_encode_h handle, image_util_colo * @see image_util_decode_run_async() * @see image_util_decode_destroy() */ -int image_util_decode_set_jpeg_downscale(image_util_encode_h handle, image_util_scale_e down_scale); +int image_util_decode_set_jpeg_downscale(image_util_decode_h handle, image_util_scale_e down_scale); /** * @brief Starts decoding of the image and fills the output buffer set using image_util_decode_set_output_buffer(). diff --git a/include/image_util_internal.h b/include/image_util_internal.h index 2d01346..4b0504c 100755 --- a/include/image_util_internal.h +++ b/include/image_util_internal.h @@ -189,7 +189,7 @@ typedef void *image_util_frame_h; * @post image_util_encode_frame_destroy() * @see image_util_encode_frame_destroy() */ -int image_util_frame_create(void *decode_encode_h, image_util_frame_h *frame_h); +int image_util_frame_create(image_util_encode_h handle, image_util_frame_h *frame_h); /** * @internal diff --git a/src/image_util_decode.c b/src/image_util_decode.c index fac8679..bcb4605 100755 --- a/src/image_util_decode.c +++ b/src/image_util_decode.c @@ -221,7 +221,7 @@ int image_util_decode_set_output_buffer(image_util_decode_h handle, unsigned cha return IMAGE_UTIL_ERROR_NONE; } -int image_util_decode_set_colorspace(image_util_encode_h handle, image_util_colorspace_e colorspace) +int image_util_decode_set_colorspace(image_util_decode_h handle, image_util_colorspace_e colorspace) { decode_s *_handle = (decode_s *) handle; @@ -235,7 +235,7 @@ int image_util_decode_set_colorspace(image_util_encode_h handle, image_util_colo return IMAGE_UTIL_ERROR_NONE; } -int image_util_decode_set_jpeg_downscale(image_util_encode_h handle, image_util_scale_e down_scale) +int image_util_decode_set_jpeg_downscale(image_util_decode_h handle, image_util_scale_e down_scale) { decode_s *_handle = (decode_s *) handle; diff --git a/src/image_util_internal.c b/src/image_util_internal.c index bf6d317..1ea44e4 100755 --- a/src/image_util_internal.c +++ b/src/image_util_internal.c @@ -116,14 +116,14 @@ int image_util_crop(unsigned char *dest, int x, int y, int *width, int *height, return _image_error_capi(ERR_TYPE_TRANSFORM, err); } -int image_util_frame_create(void *decode_encode_h, image_util_frame_h *frame_h) +int image_util_frame_create(image_util_encode_h handle, image_util_frame_h *frame_h) { int ret = MM_UTIL_ERROR_NONE; - image_util_retvm_if((decode_encode_h == NULL), IMAGE_UTIL_ERROR_INVALID_PARAMETER, "Invalid Handle"); + image_util_retvm_if((handle == NULL), IMAGE_UTIL_ERROR_INVALID_PARAMETER, "Invalid Handle"); image_util_retvm_if((frame_h == NULL), IMAGE_UTIL_ERROR_INVALID_PARAMETER, "Invalid Handle"); - encode_s *image = (encode_s *)decode_encode_h; + encode_s *image = (encode_s *)handle; image_util_retvm_if((image->image_h == NULL), IMAGE_UTIL_ERROR_INVALID_OPERATION, "The image handle is wrong"); frame_s *frame = calloc(1, sizeof(frame_s)); -- 2.7.4