platform/core/multimedia/libmm-utility.git
5 years agoMerge branch 'tizen_5.5_dev' into tizen 31/192231/3
hj kim [Thu, 1 Nov 2018 05:30:55 +0000 (14:30 +0900)]
Merge branch 'tizen_5.5_dev' into tizen

Change-Id: I2a0e2e341f3966b937933bcea8ed1640dc17d0bf

5 years agoJust add some debug msg to track error 01/187401/1 accepted/tizen/5.0/unified/20181102.014903 accepted/tizen/unified/20180824.062636 submit/tizen/20180823.021953 submit/tizen_5.0/20181101.000003
hj kim [Thu, 23 Aug 2018 02:14:13 +0000 (11:14 +0900)]
Just add some debug msg to track error

Change-Id: I2c2d904f4b40d2ac6b976616253154643101e827

5 years agoAdd to check decoding bmp failure and logs 95/187395/1
jiyong.min [Wed, 22 Aug 2018 23:31:45 +0000 (08:31 +0900)]
Add to check decoding bmp failure and logs

Change-Id: Ia8fbb10ed8a5671b78b02f82b17a454ab01f8d82

5 years agoCode optimization and fix typo 09/184209/5 accepted/tizen/unified/20180803.172007 submit/tizen/20180802.005217
jiyong.min [Mon, 16 Jul 2018 09:43:01 +0000 (18:43 +0900)]
Code optimization and fix typo

 - Remove unused *pWidth and *pHeight variable
 - Replace multiple operand to shift operand due to overflow result
 - Fix typo and change logs

Change-Id: Ifc7ceef3ef87159d6eaabca217ebea1a014d6681

5 years agoFix Wformat build error 79/184579/1 accepted/tizen/unified/20180724.073346 submit/tizen/20180723.044727
yhji [Thu, 19 Jul 2018 04:19:10 +0000 (13:19 +0900)]
Fix Wformat build error

Change-Id: I668ddd474280eb1b5adb5c42d36d8326c5237049

5 years agoModify arithmetic operation(multiplication) to shift operation due to possible intege... 08/184208/2 accepted/tizen/unified/20180718.154230 submit/tizen/20180717.054420
jiyong.min [Mon, 16 Jul 2018 09:17:44 +0000 (18:17 +0900)]
Modify arithmetic operation(multiplication) to shift operation due to possible integer underflow

Change-Id: I78f852341132296f882827a75099eca24954f0cf

5 years agoRename jpeg decoding function 78/183278/2 accepted/tizen/unified/20180706.062139 submit/tizen/20180704.232304
Jiyong Min [Wed, 4 Jul 2018 05:11:10 +0000 (14:11 +0900)]
Rename jpeg decoding function

Change-Id: I0cfea3396ce7437e32cd069f751b6da2305965a2

5 years agoMigration to OpenCV 3.4.1 16/181916/1 accepted/tizen/unified/20180621.141332 submit/tizen/20180620.034203 submit/tizen/20180620.084620
Tae-Young Chung [Tue, 5 Jun 2018 01:17:51 +0000 (10:17 +0900)]
Migration to OpenCV 3.4.1

imgcv has dependency to OpenCV which is upgraded to 3.4.1.
This is a patch for Migration to OpenCV 3.4.1.

Change-Id: I19c988f222c606f3d5084b8b046235c360f1e2dc
Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
6 years agoJust add logs for reading png 02/180002/1 accepted/tizen/unified/20180618.151411 submit/tizen/20180524.083402 submit/tizen/20180614.015738
Jiyong Min [Thu, 24 May 2018 05:04:00 +0000 (14:04 +0900)]
Just add logs for reading png

Change-Id: I1c03e7dade49e0ced25e21ffbec162d795243f63

6 years agoFix warning error 10/179410/1 accepted/tizen/unified/20180521.003621 submit/tizen/20180518.004425
Jiyong Min [Fri, 18 May 2018 00:26:14 +0000 (09:26 +0900)]
Fix warning error

Change-Id: Ifbde08cec6b4bd615d554a8802c37a4e479c9ade

6 years agoFix svace issue 09/178109/1 accepted/tizen/unified/20180509.072858 submit/tizen/20180508.063724
hj kim [Tue, 8 May 2018 06:35:23 +0000 (15:35 +0900)]
Fix svace issue

Change-Id: I5ac5745112782dda43bcb7fecc4565438ce667a9

6 years agoRemove unused code 05/177705/2
Jiyong Min [Mon, 30 Apr 2018 05:16:17 +0000 (14:16 +0900)]
Remove unused code

Change-Id: Ib85a27107c181b586b1e820d71dbe28f1ae2dd78

6 years agoFix null termination issue of filename and argv[1] 27/177427/1 accepted/tizen/unified/20180504.063600 submit/tizen/20180502.024929
Jiyong Min [Mon, 30 Apr 2018 00:45:56 +0000 (09:45 +0900)]
Fix null termination issue of filename and argv[1]

Change-Id: I080a1cbef7ea4b8e4a3913e4e282884d20a30905

6 years ago[info] Add error handling when jpeg has junk data in header 98/177098/2
Jiyong Min [Wed, 25 Apr 2018 09:03:53 +0000 (18:03 +0900)]
[info] Add error handling when jpeg has junk data in header

 - If jpeg header has junk data, block of header does not start 'FF'.
  It is neccessary to read next block till fine block.

Change-Id: Ic4e852bc6a2519b4f4175d5e2812ee3a8aa891cb

6 years agoAdd fortify option 29/175629/1 accepted/tizen/unified/20180423.062736 submit/tizen/20180419.231843
Minje Ahn [Wed, 11 Apr 2018 07:31:35 +0000 (16:31 +0900)]
Add fortify option

Change-Id: I26a1d12e99501f403961904c1d2e992ecf767ef1
Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
6 years agoFix coverity issue 57/173057/2 accepted/tizen/unified/20180321.060749 submit/tizen/20180320.040253
hj kim [Mon, 19 Mar 2018 09:29:26 +0000 (18:29 +0900)]
Fix coverity issue

Change-Id: Idd08754b958fd8b334c0d4564102c86c6322c745

6 years agoApply SAFE_STRLCPY 05/172805/1 submit/tizen/20180316.051336
Jiyong Min [Fri, 16 Mar 2018 04:56:26 +0000 (13:56 +0900)]
Apply SAFE_STRLCPY

Change-Id: I2e5d1d19292b1116125f55bb8a3ba9a09552196e

6 years agoFix coverity issue 76/172676/7
Jiyong Min [Thu, 15 Mar 2018 06:37:37 +0000 (15:37 +0900)]
Fix coverity issue

 - remove unused image_codec_type due to coverity issue

Change-Id: I2fa4798cbe93a8ff23c3b684087f8821ae1c6666

6 years agoReplace encode_with_libjpeg parameters from signed int to unsigned int 21/172621/2
Jiyong Min [Thu, 15 Mar 2018 01:49:55 +0000 (10:49 +0900)]
Replace encode_with_libjpeg parameters from signed int to unsigned int
and add to check supported format generally

 - Value width & height of libjpeg is JDIMENSION(unsigned int)
 - Added to check supported format before function works

Change-Id: I9e8ffd44227df2c0e0f6614e392e0b69b12303be

6 years agoRemain old function and rename jpeg refactoring 32/172432/2 accepted/tizen/unified/20180315.061339 submit/tizen/20180314.004633
Jiyong Min [Wed, 14 Mar 2018 03:10:11 +0000 (12:10 +0900)]
Remain old function and rename jpeg refactoring

Change-Id: I172fffbed1e3dbab5be8b100b8a4c6b9c4faa2d8

6 years agoRemove unneccessary code to check jpeg 72/172272/1
Jiyong Min [Tue, 13 Mar 2018 05:37:08 +0000 (14:37 +0900)]
Remove unneccessary code to check jpeg

Change-Id: Iea21e1309f5d177353e6e074baf3d91035859717

6 years agoChange the parameter order of internal functions 84/172184/1
Jiyong Min [Mon, 12 Mar 2018 10:31:42 +0000 (19:31 +0900)]
Change the parameter order of internal functions
(set input parameter before output parameter)

Change-Id: I274aae2dba1d1461d324062b81ae061cc905176c

6 years agoRemove jpeg decoding/encoding with turbo API because it is not stable 83/172183/1
Jiyong Min [Mon, 12 Mar 2018 10:27:01 +0000 (19:27 +0900)]
Remove jpeg decoding/encoding with turbo API because it is not stable

Change-Id: I59683cf0d608b0f782b23966f7479744bbcd1a7e

6 years agoreading & writing png code refactoring 74/171874/3
Jiyong Min [Thu, 8 Mar 2018 01:30:16 +0000 (10:30 +0900)]
reading & writing png code refactoring

Change-Id: I213c8c0f7b4475d1864d50410a1202b221e4d6b1
Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
6 years agoreading & writing bmp code refactoring 05/171705/5
Jiyong Min [Wed, 7 Mar 2018 00:22:03 +0000 (09:22 +0900)]
reading & writing bmp code refactoring

Change-Id: I0078b61fe5e8cc42220231e78153f1f4bc8be4b4
Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
6 years agoUse size_t for buffer size 76/171676/2
hj kim [Tue, 6 Mar 2018 10:25:06 +0000 (19:25 +0900)]
Use size_t for buffer size

Change-Id: I7bf0dad5063003c69f17874d4df6b18869614114

6 years agoUnify the type of the buffer size from 'unsigned int'/'unsigned long' to 'size_t' 71/171671/2
Jiyong Min [Tue, 6 Mar 2018 09:44:00 +0000 (18:44 +0900)]
Unify the type of the buffer size from 'unsigned int'/'unsigned long' to 'size_t'

Change-Id: Ibbc37e0c3b5efde47c3d546fe10716c2b2292142
Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
6 years agoChange the order of the parameters 82/171582/3
Jiyong Min [Tue, 6 Mar 2018 04:52:46 +0000 (13:52 +0900)]
Change the order of the parameters

 - The order is input parameter before output parameter.
 - The decoded data is composed with width, height, format, data and size.
 - The source data of encoding is replaced to the decoded data.

Change-Id: Idf1de7e1515d5e5bc25e375031f81faaacdc07ba
Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
6 years agoRemove unused function 81/171581/1
Jiyong Min [Tue, 6 Mar 2018 04:48:05 +0000 (13:48 +0900)]
Remove unused function

Change-Id: I36d02b3c97227c6d1e6bea87662d9e4dfef29ccf
Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
6 years agoMerge "Fix typo and TAINTED_INT svace issue" into tizen
Jiyong Min [Tue, 6 Mar 2018 04:44:53 +0000 (04:44 +0000)]
Merge "Fix typo and TAINTED_INT svace issue" into tizen

6 years agoBuild error fix 79/171579/1 accepted/tizen/unified/20180307.071315 submit/tizen/20180305.053300
hj kim [Tue, 6 Mar 2018 04:21:41 +0000 (13:21 +0900)]
Build error fix

Change-Id: I16f46edb65f3eb4808b68400bbc32139102cb309

6 years agoFix typo and TAINTED_INT svace issue 71/171571/1
Jiyong Min [Tue, 6 Mar 2018 01:17:48 +0000 (10:17 +0900)]
Fix typo and TAINTED_INT svace issue

Change-Id: I71664d4f8cdf26e85371231873c8170add4474ea
Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
6 years agoCode Refactoring for testsuite 94/171494/3
Jiyong Min [Mon, 5 Mar 2018 06:33:22 +0000 (15:33 +0900)]
Code Refactoring for testsuite

 - mm_util_bmp_testsuite
 - mm_util_jpeg_testsuite
 - mm_util_png_testsuite

Change-Id: I21b4f457152d9a5b1f20b8aa23c7cfbbaf0d9723
Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
6 years agoCode Refactoring - wrong parameter usages 86/171286/2
Jiyong Min [Wed, 28 Feb 2018 07:35:04 +0000 (16:35 +0900)]
Code Refactoring - wrong parameter usages

Change-Id: Ic48a798223eb64b817302520a26a63320b24fc31
Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
6 years agoCode Refactoring - remove unneccessary extern function 32/171232/1 submit/tizen/20180228.025609
Jiyong Min [Wed, 28 Feb 2018 00:16:30 +0000 (09:16 +0900)]
Code Refactoring - remove unneccessary extern function

Change-Id: Idbffd3ce9337a9b73e4a06b35a736f7b5ef2ab0d
Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
6 years agoCode Refactoring - remove inefficient functions to set PNG value 31/171231/1
Jiyong Min [Tue, 27 Feb 2018 23:33:03 +0000 (08:33 +0900)]
Code Refactoring - remove inefficient functions to set PNG value

Change-Id: I72a46e6ed9fa264a283ec1805751db5f5a6422fa
Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
6 years agoCode Refactoring - remove unused PNG progressive decoding 28/171228/4
Jiyong Min [Tue, 27 Feb 2018 23:24:37 +0000 (08:24 +0900)]
Code Refactoring - remove unused PNG progressive decoding

Change-Id: I235a533f148b3dee407dd5a319c10be873e6d2e3
Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
6 years agoRemove abnormal free the decoded buffer to fix crash issue 18/171018/1 accepted/tizen/unified/20180226.142324 submit/tizen/20180223.061228
Jiyong Min [Mon, 26 Feb 2018 00:47:21 +0000 (09:47 +0900)]
Remove abnormal free the decoded buffer to fix crash issue

Change-Id: I01da12ea31669cd9da1e572f52cea99d4eb3642d
Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
6 years agoChange unsigned int to size_t for buffer_size 97/170897/3
hj kim [Fri, 23 Feb 2018 05:11:21 +0000 (14:11 +0900)]
Change unsigned int to size_t for buffer_size

Change-Id: Iefcb87e8a4d834602a9689be5061d5cb8d13bf0d

6 years agoChange unsigned int to size_t for buffer_size 67/170867/3
hj kim [Fri, 23 Feb 2018 02:43:05 +0000 (11:43 +0900)]
Change unsigned int to size_t for buffer_size

Change-Id: Idb5e77b25a02d8ad53f7ada899f365c75be747ec

6 years agoUnify __mm_image_encode_to_jpeg_memory_with_libjpeg() and __mm_image_encode_to_jpeg_f... 16/170816/2
hj kim [Thu, 22 Feb 2018 09:07:33 +0000 (18:07 +0900)]
Unify __mm_image_encode_to_jpeg_memory_with_libjpeg() and __mm_image_encode_to_jpeg_file_with_libjpeg() to __mm_image_encode__with_libjpeg()

Change-Id: I77b3edc39c39218be412f7ef9a5574406722188a

6 years agoUnify __mm_image_decode_from_jpeg_file_with_libjpeg() and __mm_image_decode_from_jpeg... 85/170785/1
hj kim [Thu, 22 Feb 2018 05:59:50 +0000 (14:59 +0900)]
Unify __mm_image_decode_from_jpeg_file_with_libjpeg() and __mm_image_decode_from_jpeg_memory_with_libjpeg() to __mm_image_decode_with_libjpeg()

Change-Id: I200d2f08eb0eebe234fa058e4b4c3d9b650b7cfb

6 years agoRemove mm_util_decode_from_jpeg_memory() and mm_util_decode_from_jpeg_file() API... 27/170727/2
hj kim [Thu, 22 Feb 2018 01:08:22 +0000 (10:08 +0900)]
Remove mm_util_decode_from_jpeg_memory() and mm_util_decode_from_jpeg_file() API. because those are almost same as _with_downscale() API

Change-Id: I113bb58a73153d91c0d08c602e4c5283dbc996a4

6 years agoCode Refactoring - remove unused jpeg code 31/170731/3
Jiyong Min [Thu, 22 Feb 2018 01:23:11 +0000 (10:23 +0900)]
Code Refactoring - remove unused jpeg code

 - remove unused define and variables
 - change #ifdef LIBJPEG_TURBO boundary
 - use common ROUND_UP_X & ROUND_DOWN_X for imgp & jpeg

Change-Id: I0fd96993b1e5802a42c9a34b17c027d2c25f35d5
Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
6 years agoModify mm_util_convert_colorspace() API to receive allocated buffer and buffer info 68/170668/1
hj kim [Wed, 21 Feb 2018 08:59:01 +0000 (17:59 +0900)]
Modify mm_util_convert_colorspace() API to receive allocated buffer and buffer info

Change-Id: I606b2789a900cbb78cfc01d38aef2e54d9667e25

6 years agoJust update debug msg 08/170608/3
hj kim [Wed, 21 Feb 2018 04:53:44 +0000 (13:53 +0900)]
Just update debug msg

Change-Id: I1fca7f465ad81e9dfad44d1fca11e729f3118c07

6 years agoModify mm_util_resize_image() API to receive allocated buffer and buffer info 53/170453/3
hj kim [Tue, 20 Feb 2018 06:10:46 +0000 (15:10 +0900)]
Modify mm_util_resize_image() API to receive allocated buffer and buffer info

Change-Id: I46bcdf8ef91f999cdddab5415d1daa5d371425c3

6 years agoModify mm_util_rotate_image() API to receive allocated buffer and buffer info 23/170423/3
hj kim [Tue, 20 Feb 2018 04:25:25 +0000 (13:25 +0900)]
Modify mm_util_rotate_image() API to receive allocated buffer and buffer info

Change-Id: Ie4bf988dc07230b2a0f66c7ce1a8d335434c8128

6 years agoAdd missing modification for imagesize replacement 75/170575/1
Jiyong Min [Wed, 21 Feb 2018 01:07:28 +0000 (10:07 +0900)]
Add missing modification for imagesize replacement

Change-Id: I4179839c22ba116d3b18fdfa607fd34e0251ed5a
Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
6 years agoModify the range of 'imgsize' from 'unsigned int' to 'Size_t' 26/170426/2 submit/tizen/20180220.054545
Jiyong Min [Tue, 20 Feb 2018 05:05:23 +0000 (14:05 +0900)]
Modify the range of 'imgsize' from 'unsigned int' to 'Size_t'
(fix 64bit error)

Change-Id: I440601c12e34cfae2ca8cf75580bb5990bd24d86
Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
6 years agochange dst_buf_size to res_buffer_size 92/170392/2 submit/tizen/20180220.014003
hj kim [Mon, 19 Feb 2018 23:59:52 +0000 (08:59 +0900)]
change dst_buf_size to res_buffer_size

Change-Id: I9e351f40cbd1aead859684111358e2649dd2474c

6 years agoRemove useless code. only RGB format can be round up in current gstreamer code 58/170358/1
hj kim [Mon, 19 Feb 2018 09:56:30 +0000 (18:56 +0900)]
Remove useless code. only RGB format can be round up in current gstreamer code

Change-Id: Ibfe95c1e38edc14bd601f1d02bc60c4ff3842213

6 years agoRemove useless buffer calcurate code 52/170352/1
hj kim [Mon, 19 Feb 2018 09:31:52 +0000 (18:31 +0900)]
Remove useless buffer calcurate code

Change-Id: Ic32cf33c9acad51cebeadee457e3fcec04cf499b

6 years agoJust update debug msg 46/170346/2
hj kim [Mon, 19 Feb 2018 08:49:11 +0000 (17:49 +0900)]
Just update debug msg

Change-Id: Ie1f91df536342038ea6eb5d7a0e4168241286d15

6 years agoModify mm_util_crop_image() API to receive allocated buffer and buffer info 38/170338/2
hj kim [Mon, 19 Feb 2018 08:07:12 +0000 (17:07 +0900)]
Modify mm_util_crop_image() API to receive allocated buffer and buffer info

Change-Id: If059b7e93e7a13bbb859e58d64d92c45c62674ed

6 years agoAdd to calculate the buffer size for NV21 colorsapce 12/170312/4 submit/tizen/20180219.051103
Jiyong Min [Mon, 19 Feb 2018 04:33:39 +0000 (13:33 +0900)]
Add to calculate the buffer size for NV21 colorsapce

Change-Id: I25da32e7cf667b58bfb1d5e4018b154043a848c0

6 years agoAdd safe_fopen safe_fclose to check realpath and remove useless code 65/170165/5
Jiyong Min [Wed, 14 Feb 2018 02:02:19 +0000 (11:02 +0900)]
Add safe_fopen safe_fclose to check realpath and remove useless code

Change-Id: Ib1d743adcb196e77d6b9409e2572d6f54762aef4

6 years agoFix test code and update some debug msg 84/170184/2
hj kim [Wed, 14 Feb 2018 05:10:29 +0000 (14:10 +0900)]
Fix test code and update some debug msg

Change-Id: I89a04243847ca46a645bba1474263e96df6511e6

6 years agoAdd code to check color format before doing transform. and remove useless code of... 51/170151/2
hj kim [Wed, 14 Feb 2018 00:31:18 +0000 (09:31 +0900)]
Add code to check color format before doing transform. and remove useless code of convert format check

Change-Id: Iada70374163342893c1c58c3d839a4d4fcf4ec5f

6 years agoRemove useless format_label 85/170085/2
hj kim [Tue, 13 Feb 2018 08:12:28 +0000 (17:12 +0900)]
Remove useless format_label

Change-Id: I8aa9106709c771c6a058070ea95d4619c18dfc68

6 years agoCode Refactoring: apply unified color format 52/169652/5 accepted/tizen/unified/20180214.144545 submit/tizen/20180212.075159
Jiyong Min [Thu, 8 Feb 2018 06:34:05 +0000 (15:34 +0900)]
Code Refactoring: apply unified color format

 - Add 'mmutil_common' library for using all
 - Replace color interface 'mmutil_imgp' to 'mmutil_common' library
 - Unify color formats
 - Remove unused replacement in spec file
 - Remove unused 'format' parameter of internal crop function

Change-Id: I308e484b90b958e870959214215c8f649b68e698

6 years agoRemove memory allocation code. because mm_imgp is changed to do alloc memory 43/169543/1
hj kim [Wed, 7 Feb 2018 09:01:30 +0000 (18:01 +0900)]
Remove memory allocation code. because mm_imgp is changed to do alloc memory

Change-Id: Icd030f536ab7c842845ec8f26fe47c4c18dc52e5

6 years agoCode refactoring. unify duplicated code 60/169460/1
hj kim [Wed, 7 Feb 2018 04:34:43 +0000 (13:34 +0900)]
Code refactoring. unify duplicated code

Change-Id: I64069b9568c59a9bfc306029dd3f10f644e65c31

6 years agoRemove unused functions and gif/png dependency of header 41/169341/4
Jiyong Min [Tue, 6 Feb 2018 05:42:50 +0000 (14:42 +0900)]
Remove unused functions and gif/png dependency of header

Change-Id: I1f05c9814b20decac56757e67196b7dd2aee54fe

6 years agoAdd to check installed libraries of libbmp, libnsbmp and libpng and replace the heade... 43/168943/5 accepted/tizen/unified/20180206.064130 submit/tizen/20180205.005408
Jiyong Min [Thu, 1 Feb 2018 09:18:01 +0000 (18:18 +0900)]
Add to check installed libraries of libbmp, libnsbmp and libpng and replace the header of libraries

Change-Id: Iee6ec8819f16d47020545b3b417ae29d6a86a224

6 years agoFix typo 01/169001/1 accepted/tizen/unified/20180202.061005 submit/tizen/20180202.000421
Minje Ahn [Thu, 1 Feb 2018 23:41:29 +0000 (08:41 +0900)]
Fix typo

Change-Id: I92886d9a73e2fc89076604d8fa56a54a6e70df3f
Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
6 years agoAdd new API mm_util_extract_image_info() 33/168933/2 accepted/tizen/unified/20180202.060943 submit/tizen/20180201.081645
hj kim [Thu, 1 Feb 2018 07:59:53 +0000 (16:59 +0900)]
Add new API mm_util_extract_image_info()

Change-Id: I788c81943a4ff766a50aa154354f6a996e35852c

6 years agoImprove performance of Resize and Read from /Write to File. 53/168253/9 accepted/tizen/unified/20180131.060525 submit/tizen/20180130.062418
hj kim [Thu, 25 Jan 2018 07:46:13 +0000 (16:46 +0900)]
Improve performance of Resize and Read from /Write to File.

1. Use Sample and Scale API instead of Resize API
2. Apply jpeg Options like dct_method
3. Remove Profiles like IPTC, ICM

Change-Id: I7e54109c5855b6f49e08806586b26ca2d57d3722

6 years agoAdd new convert API using graphickMagicK mm_util_convert_B_B 13/168213/1
hj kim [Thu, 25 Jan 2018 05:06:52 +0000 (14:06 +0900)]
Add new convert API using graphickMagicK  mm_util_convert_B_B

Change-Id: I62fcd62ad171f813d4ef4ec42e88769de451857b

6 years agoAdd the debug mode for GraphicsMagick 06/167906/7
Jiyong Min [Tue, 23 Jan 2018 02:24:34 +0000 (11:24 +0900)]
Add the debug mode for GraphicsMagick

Change-Id: I87cd4c5018d5ce51a8aeaeec66bcaf6e8f78bec6

6 years agochange of debug msg format and update some debug msg 03/167903/4 accepted/tizen/unified/20180124.061556 submit/tizen/20180123.002657
hj kim [Tue, 23 Jan 2018 01:59:32 +0000 (10:59 +0900)]
change of debug msg format and update some debug msg

Change-Id: I88da902696b4ba0222400f5d58e9d530f7c5d3b5

6 years agoAdd new rotate and resize APIs those are use GraphickMagicK 51/166851/13
hj kim [Fri, 12 Jan 2018 06:30:13 +0000 (15:30 +0900)]
Add new rotate and resize APIs those are use GraphickMagicK

Change-Id: I2cb2a02be97fdfebf308733250bf4b236f27340e

6 years agoChange the buffer(memory) parameter of the image for decoding and remove unused code 63/165763/6 accepted/tizen/unified/20180109.172741 submit/tizen/20180108.064644
Jiyong Min [Wed, 3 Jan 2018 23:14:20 +0000 (08:14 +0900)]
Change the buffer(memory) parameter of the image for decoding and remove unused code
(The buffer is used as 'void *', so 'void **' is changed to 'void *'.)

Change-Id: Id1636f5e5550983efd7742205dcce462dc7b5385

6 years agoBug fix of realpath check. File does not exist for some case. so apply realpath only... 24/164224/2 accepted/tizen/unified/20171229.070222 submit/tizen/20171227.043416
hj kim [Mon, 18 Dec 2017 06:37:18 +0000 (15:37 +0900)]
Bug fix of realpath check. File does not exist for some case. so apply realpath only when file exist

Change-Id: I53ab9908425d750a75fca0c76cc081b4d53e671f

6 years agoAdd to check realpath before fopen 91/163391/6 accepted/tizen/unified/20171211.160409 submit/tizen/20171211.080624
Jiyong Min [Mon, 11 Dec 2017 04:04:33 +0000 (13:04 +0900)]
Add to check realpath before fopen

Change-Id: If29fb2f6e731625dd2b69fa3a8db404345bb3b72
Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
6 years agoRemove mm_util_set_hardware_acceleration(). This API doesn't work 00/163100/1
hj kim [Thu, 7 Dec 2017 07:45:26 +0000 (16:45 +0900)]
Remove mm_util_set_hardware_acceleration(). This API doesn't work

Change-Id: Icf8db40cf36b80673fe52bd2a4e6bf3c779a83fb

6 years agoMake files clean up and fixing build error 93/162893/5 submit/tizen/20171207.225809
Jiyong Min [Wed, 6 Dec 2017 04:23:05 +0000 (13:23 +0900)]
Make files clean up and fixing build error

Change-Id: I76c89b0b1ebcbcbdfa77c0c2eee78a1fd986e58f
Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
6 years agoChange 'LIBDIR' to '${LIB_INSTALL_DIR}'(macro) and remove unused configure 83/162683/3 submit/tizen/20171204.084209
Jiyong Min [Tue, 5 Dec 2017 02:02:12 +0000 (11:02 +0900)]
Change 'LIBDIR' to '${LIB_INSTALL_DIR}'(macro) and remove unused configure
(Fix C# TCT failure due to wrong libdir path)

Change-Id: I36ee7b665f2ebf36eb28fbe63d5d67ef805fc77d
Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
6 years agoJust add define 13/162413/1
hj kim [Fri, 1 Dec 2017 02:43:05 +0000 (11:43 +0900)]
Just add define

Change-Id: Ifcd679a3714d80f011507dc10b356162f600a155

6 years agoChange hard coded path to get by using tzplatform API 42/162142/1 accepted/tizen/unified/20171130.113336 submit/tizen/20171130.061035
hj kim [Wed, 29 Nov 2017 08:51:16 +0000 (17:51 +0900)]
Change hard coded path to get by using tzplatform API

Change-Id: I786b53b07e41e44696f912aff556ff3d583332f4

6 years agoApply CMake 19/161719/5
Jiyong Min [Mon, 27 Nov 2017 06:20:37 +0000 (15:20 +0900)]
Apply CMake

Change-Id: If83b3416c06d22f5df1935e7e4a12cf02814f2e2
Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
6 years agoRemove capi-media-tool dependency 58/161558/2
hj kim [Fri, 24 Nov 2017 06:23:24 +0000 (15:23 +0900)]
Remove capi-media-tool dependency

Change-Id: I9d12dbcfffe91cc7bc7d60a9a20085bcaaf9ebc7

6 years agoRemove capi-media-tool dependency & unused libraries 98/161198/3 submit/tizen/20171123.062739 submit/tizen/20171124.024723
Jiyong Min [Wed, 22 Nov 2017 05:53:30 +0000 (14:53 +0900)]
Remove capi-media-tool dependency & unused libraries

Change-Id: I4337e2dbc242fafc7e8683e833b403d8887e9689
Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
6 years agoModify media_packet creation for invalid operation error 11/160411/3 accepted/tizen/unified/20171120.065131 submit/tizen/20171120.011858
Jiyong Min [Thu, 16 Nov 2017 05:28:16 +0000 (14:28 +0900)]
Modify media_packet creation for invalid operation error

[Problem]
Rarely, invalid operation was returned

[Cause]
Because of the difference between tbm buffer and gstreamer buffer,
the size of packet was not same with the size of buffer.

[Solution]
Use smaller size of buffer than others.

Change-Id: I3f32ef0396f26bada0df6dc907777dd325776924
Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
6 years agoModify buffer overflow when image was rotated 84/160384/3
Jiyong Min [Thu, 16 Nov 2017 02:21:14 +0000 (11:21 +0900)]
Modify buffer overflow when image was rotated

[Problem] Crash happen by buffer overflow

[Cause]
The size of the buffer is calculated with width, height and format
The width should be a multiple of 4 or 8, so the size of the buffer is affected from the width.
But the width and the height were swapped for some cases. So the size of the buffer was not correct.

[Solution]
To swap the width and the height is not neccessary. It is removed.

Change-Id: I832b18a50470681588137ace90d0f6178c96a927
Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
6 years agoModify the value returned by transform to return correct error 01/160201/6
Jiyong Min [Wed, 15 Nov 2017 01:18:06 +0000 (10:18 +0900)]
Modify the value returned by transform to return correct error

 + Replace 'media_format_make_writable' to 'media_format_create'
 because 'media_format_make_writable' does not create new media_format_h in some case.

Change-Id: I1292c14104e66beef6ed7c692821179724399e53
Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
6 years agoRemove TTRACE dependency and refine debug msg 32/160032/4
hj kim [Tue, 14 Nov 2017 07:37:58 +0000 (16:37 +0900)]
Remove TTRACE dependency and refine debug msg

Change-Id: I55a3e86fdb1ef01b1016bff3c1cd845193a82d14

6 years agoFix 64bit build error (Replace 'llu' to 'PRIu64') 60/159960/1
Jiyong Min [Tue, 14 Nov 2017 02:43:23 +0000 (11:43 +0900)]
Fix 64bit build error (Replace 'llu' to 'PRIu64')

Change-Id: I9970ba17d5559940ba5115dd63c2e9901eb2450b
Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
6 years agoAdd missing media_packet color to fix that image-util can not support BGRA color 03/159603/1 submit/tizen/20171113.042933 submit/tizen/20171113.231122
Jiyong Min [Fri, 10 Nov 2017 05:52:36 +0000 (14:52 +0900)]
Add missing media_packet color to fix that image-util can not support BGRA color

Change-Id: I2a57d755f3fdc848d5b9cdbe79ae97dbbb878d31
Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
6 years agoCode clean up of TTRACE and modify converting colorspace not working 96/159596/1
Jiyong Min [Fri, 10 Nov 2017 04:50:12 +0000 (13:50 +0900)]
Code clean up of TTRACE and modify converting colorspace not working

 - On the case of converting colorspace, can missed dst_width and dst_height.
   As the result dst_width and dst_height is zero, src_width and src_height
   should be assigned to dst_width and dst_height.

Change-Id: I04c218ae4ac90d6e7aaa829846ff4f3d629784f4
Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
6 years agoCode clean up header files and memory allocations 20/159320/4 submit/tizen/20171110.043613
Jiyong Min [Wed, 8 Nov 2017 07:18:13 +0000 (16:18 +0900)]
Code clean up header files and memory allocations

Change-Id: I958b612a5d56c2ae84a0ee0bd0de7e2fee74aa9a
Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
6 years agoModify the size of the buffer for rotating or cropping image 72/159072/3 accepted/tizen/unified/20171108.063455 submit/tizen/20171107.034519
Jiyong Min [Tue, 7 Nov 2017 01:13:51 +0000 (10:13 +0900)]
Modify the size of the buffer for rotating or cropping image

 - Problem:
   Crash happen when image is rotated or cropped.

 - Cause & Solution:
   Because of removing the get resolution function at 'https://review.tizen.org/gerrit/#/c/158301/'.
   The size of 'dst' buffer is '0'.
   The size of buffer should be calculated by the width and height of source.

Change-Id: I1d87e51648a70504c754f99cca2fd8ce6b378c6d
Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
6 years agoCode clean up of removing unused define, macro and variables 56/158756/1 accepted/tizen/unified/20171103.162253 submit/tizen/20171103.020449
Jiyong Min [Fri, 3 Nov 2017 01:16:44 +0000 (10:16 +0900)]
Code clean up of removing unused define, macro and variables

Change-Id: Ia00a96b050141df12abee7255072b96d7e816c3f
Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
6 years agoModify to get the size of the cropped image and modify to check wrong parameter 77/158477/2
Jiyong Min [Wed, 1 Nov 2017 07:26:32 +0000 (16:26 +0900)]
Modify to get the size of the cropped image and modify to check wrong parameter

Cause: Cropping dosen't use gstreamer but getting the size is based
  on gstreamer. So the size of the cropped image is not matched with
  getting the size by mm_util_get_image_size().

Solution: The function to get the size of cropped image has been added.
  Generally, getting image size should be seperated for libraries.

Change-Id: If8086bf1a03b6fd0a8eb56d94bb05a355d902cb8
Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
6 years agoCode Cleanup unneccessary variables and functions 56/158356/4 accepted/tizen/unified/20171101.064755 submit/tizen/20171101.024016
Jiyong Min [Tue, 31 Oct 2017 08:14:08 +0000 (17:14 +0900)]
Code Cleanup unneccessary variables and functions

 - Remove frames to fix memory leak (decoder supports 1 frame)
 - Remove GIF_ENCODER_V2 define
 - Remove unused functions after frames and define is deleted

Change-Id: Ie279fe4b83e4cb1de7b16b70ec2ac5a82f02df6f
Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
6 years agoFix buffer-overflow issue when image was cropped 01/158301/3
Jiyong Min [Tue, 31 Oct 2017 04:03:08 +0000 (13:03 +0900)]
Fix buffer-overflow issue when image was cropped

Cause: Before image is cropped, the buffer in media packet is allocated.
At this case, the size of cropped image is changed to be multiple by 4.
The size of the buffer in media packet is smaller than the size of cropped image.
So It make buffer-overflow issue.

Solution: It is fixed to allocate the buffer in media_packet after image is cropped.

 - replace media_packet creation to after transform is done.
 - remove unused get_resolution function.
 - add to allocate and free 'handle->dst' buffer to use transform.

Change-Id: I127e7cd45035bd1c5c4277cff835a2e647c65765
Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
6 years agoCode Cleanup for __mm_util_transform_exec 01/158201/3
Jiyong Min [Mon, 30 Oct 2017 09:28:06 +0000 (18:28 +0900)]
Code Cleanup for __mm_util_transform_exec

 - Add function for __mm_util_transform_exec to be simplified

Change-Id: Ie91b1a69c004c1586a4806e5f85a99a9f1ec5f68
Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
6 years agoFix leak and double-free in gif encoding 78/157778/1
Anastasia Lyupa [Thu, 26 Oct 2017 07:35:12 +0000 (10:35 +0300)]
Fix leak and double-free in gif encoding

Not return before free remaining data in mm_util_gif_encode_destroy().
Free gif_file->saved_image after all saved images are freed
in mm_util_gif_encode().

Change-Id: I318049461669d769f6126c395089c56ab2311bc0
Signed-off-by: Anastasia Lyupa <a.lyupa@samsung.com>
6 years agoReplace thread creation before pushing data to async_queue after pushing data to... 67/157067/5 accepted/tizen/unified/20171025.075123 submit/tizen/20171024.105208
Jiyong Min [Mon, 23 Oct 2017 08:22:21 +0000 (17:22 +0900)]
Replace thread creation before pushing data to async_queue after pushing data to async_queue.
(Fix callback not invoked because thread finish with no data)

Change-Id: Id6109637cac8900ff95ad20feef64c037592b284
Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
6 years agoRemove unused variables 91/156791/1
Jiyong Min [Fri, 20 Oct 2017 04:15:58 +0000 (13:15 +0900)]
Remove unused variables

Change-Id: Idcdd18f6d3d28ccf475b493ed39cd03f07ad4351
Signed-off-by: Jiyong Min <jiyong.min@samsung.com>