Commit Graph

60 Commits

Author SHA1 Message Date
Vincent Torri f7c560c311 replace hton and ntoh family functions with ones defined in eina
Summary: This fixes especially the execution of edje_cc on Windows

Test Plan: execution of edje_cc

Reviewers: cedric, raster

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7834
2019-02-01 14:25:35 +00:00
Pawel Aksiutowicz 599a36b8ee eet: removed warning from eet_image
Reviewers: stanluk, lukasz.stanislawski

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5505
2017-11-21 11:12:56 +09:00
Jean Guyomarc'h cbde2cb04b
eet: return 0 instead of NULL when the return type is int 2016-11-12 10:42:45 +01:00
Artem Popov e6b074ad21 eet: add to basic eet_image EAPIs checking on NULL
@fix

Summary: to avoid segfaults with NULL raw data, add checking on NULL to basic eet_image APIS

Reviewers: NikaWhite, cedric, myoungwoon, jpeg

Reviewed By: jpeg

Subscribers: t.naumenko, jpeg

Differential Revision: https://phab.enlightenment.org/D4386

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-11-11 09:58:30 -08:00
Sungtaek Hong b437bfb3fe eet: set alpha_texture for ETC1+Alpha
Summary:
alpha_texture need to be set EINA_TRUE to support ETC1+Alpha

@fix

Test Plan:
Create an EDC file with png image with Alpha.
           compress image with ETC1 and ETC2.
           Observe Alpha is properly applied in both case.

Reviewers: jpeg, Hermet, cedric

Reviewed By: cedric

Subscribers: conr2d

Differential Revision: https://phab.enlightenment.org/D4307

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-09-20 15:01:48 -07:00
junsu choi 610b766db2 eet_image.c : Fix build warning
Summary: initialized two variable for uninitialized build warning

Test Plan: N/A

Reviewers: woohyun, raster

Reviewed By: raster

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3990
2016-05-30 14:18:31 +09:00
Cedric BAIL 0c4880e99d efl: everyone should now rely on Eina MIN/MAX redefinition. 2016-05-09 16:58:53 -07:00
Jean-Philippe Andre 509ee0f275 Evas: Disable TGV save debugging and fix error log
Disable time stats & quality check
Remove an invalid error message (was logged in case of success)
2015-10-29 21:18:32 +09:00
Jean-Philippe Andre 3f264677fb Eet: Another ETC decoding fix
@fix
2015-10-29 21:06:16 +09:00
Jean-Philippe Andre cc5cccc511 Eet: fix decoding of embedded ETC images
Typos, lack of NULL check, excessive sizeof(type) not matching
the object type, no border set, etc... This all lead to a crash
and then no render (with an error message and then without...).

This also simplifies the implicit loading of ETC1 as ETC2 when
supported by the driver.

@fix
2015-10-29 17:58:34 +09:00
Jean-Philippe Andre 258dc999ee Emile: Fix memory leak
The binbuf wrappers were never freed.
2015-04-13 14:00:46 +09:00
Cedric BAIL 0e5686de73 eet: remove use of deprecated Eina_Binbuf functions. 2015-03-17 09:58:21 +01:00
Cedric BAIL 90d8932a03 emile: remove binbuf from emile compression functions. 2015-03-17 09:58:20 +01:00
Cedric BAIL a2385e2ebc emile: follow convention for Emile_Compressor_Level. 2015-03-17 09:58:20 +01:00
Cedric BAIL 4095519d65 emile: fix crash when cspaces is left unchanged. 2015-03-17 09:58:19 +01:00
Cedric BAIL 0e7452a9e1 eet: encode lossy image with AGRY88 or GRY8 whenever possible. 2015-03-17 09:58:19 +01:00
Cedric BAIL 580a893d2e eet: refactoring jpeg encoding. 2015-03-17 09:58:19 +01:00
Cedric BAIL 182568f103 eet: handle AGRY88 encoding for JPEG encoded image.
The alpha and the grey being encoded in two separated grey JPEG.
2015-03-17 09:58:19 +01:00
Cedric BAIL ce340ce2fb eet: fix error handling when decoding TGV file format. 2015-03-17 09:58:19 +01:00
Cedric BAIL c221f33428 eet: use Emile to decode jpeg. 2015-03-17 09:58:19 +01:00
Cedric BAIL f9125499f9 eet: use Emile to decode TGV image section. 2015-03-17 09:58:18 +01:00
Cedric BAIL 65248db8d8 eet: use eina_binbuf and emile to manipulate TGV compressed data. 2015-03-17 09:58:18 +01:00
Cedric BAIL f9dd639a92 eet: use Emile instead of Zlib and LZ4 directly. 2015-03-17 09:58:17 +01:00
Carsten Haitzler b86579bed6 eet - fix endianess break added by cedric a year ago in image decoding
@fix

this fixes T1987 - the commit that broke it was:

commit 18d494489c
Author: Cedric BAIL <cedric.bail@samsung.com>
Date:   Fri Jan 3 16:20:53 2014 +0900

    eet: use eina_swap*() function instead of custom slower one.
2015-02-04 18:04:55 +09:00
Cedric BAIL d2b766a51d eet: properly handle failure and success case by not leaking memory.
CID 1265601.
2015-01-21 16:07:07 +01:00
Carsten Haitzler f4ec47522f eet - one place endianess check wasn't explicit - cleaner code if it is
this MAY be a bugfix, but i can't see how after checking the code, but
to keep it conistent and less likely to grow a bug... do this.
2015-01-14 18:17:19 +09:00
Carsten Haitzler 7532dee7bb eet - boyscouting - clean up whitespaces 2015-01-14 18:13:57 +09:00
Carsten Haitzler 7a8f7047ac eet - image decode - fix robustness of image decode from eet file
there are possible security implications by not checking values of
size fields to see if they are within the data range AND are not 0 or
negative. so do this.

@fix
2015-01-14 18:12:42 +09:00
Tom Hacohen 565f2af60f Eee image: fix macros to be surrounded with do while().
Macros should be surrounded with do {} while() statements,
otherwise there can be issues, like the macro not requiring a semicolon
after the statement or etc.

@fix
2015-01-14 08:55:30 +00:00
Chris Michael db53875e0a eet: Remove unused variable
Summary: This just removes an unused variable spotted during compile.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-01-06 09:05:37 -05:00
Cedric BAIL b61e9525d1 eet: refactoring jpeg encoding. 2015-01-06 11:51:58 +01:00
Cedric BAIL 6724bbf8bd eet: refactorize handling of endian. 2015-01-06 11:49:28 +01:00
Cedric BAIL 18d494489c eet: use eina_swap*() function instead of custom slower one. 2015-01-06 11:48:25 +01:00
Stefan Schmidt 6b27d7add2 eet: Switch from obsolete LZ4_uncompress function to LZ4_decompress_fast
The function is declared as obsolete and in some newer headers it is no
longer defined. The new function is the same besides the name change.
2014-12-10 14:52:58 +01:00
Cedric BAIL fb8087b0a7 eet: shutup stupid compiler warning. 2014-10-22 22:30:29 +02:00
Jean-Philippe Andre a3caed8012 Eet: Fix eet jpeg image load
Commit 101dee79b0 introduced critical errors, as standard
error callbacks now fail.

Apparently, these error callbacks depend on the installed version
of libjpeg (8 vs. 9).

I couldn't start E without this commit.
2014-10-21 15:59:50 +09:00
Vincent Torri 101dee79b0 eet: enhance error messages with libjpeg
@fix
2014-10-20 18:40:20 +02:00
Stefan Schmidt 3fe554e0b6 build: Allow to use external liblz4 instead of embedded copy
While we are likely will keep the embedded copy for a while to avoid a really
new dependency we allow now to use the external liblz4. You need at least
revision r120 and a package that ships the pc file for it.

Personally I would like to get rid of it rather sooner than later due to the
security implications and a bunch of code we ship but have no idea about.
Reality is that it will need some time until this new lib is actually
packaged and shipped with releases for a a majority of people.

This patch was co-worked with Doug Newgard <scimmia22@outlook.com>
2014-08-22 16:27:28 +02:00
Cedric BAIL e5d841354d eet: fix possible ABI break. 2014-08-11 16:17:05 +02:00
Jean-Philippe Andre 68a8063f9a Eet: Add support for ETC1+Alpha
The TGV file format and GL engine now support ETC1 encoding
with alpha using an extra texture.
This commit adds similar support to the Eet encoder/decoder.

@feature
2014-07-11 16:40:34 +09:00
Jean-Philippe Andre 4efcd46cbf Eet: Add INF message about how slow ETC2 encoding is 2014-06-13 17:58:13 +09:00
Jean-Philippe Andre c21968bcd7 Eet: Add support for ETC2 encoding and decoding
Since we now have full support for ETC2, add the colorspaces
to Eet.

@feature
2014-06-13 17:14:56 +09:00
Jean-Philippe Andre 28ce791dfa Evas TGV: Fix distortion of TGV images (ETC1)
Due to some invalid geometry considerations, there was a
1 pixel distortion in images, varying with the lz4 compressed
macro-block size.

Anyhow, I couldn't wrap my head around Cedric's code. So I rewrote
the whole thing instead, fixed it and improved the block size
selection (based on the image size, to optimize lz4 compression).
2014-04-25 12:08:56 +09:00
Jean-Philippe Andre 7ff410b9f6 Edje: Fix ETC1 encoding with EET and Edje
There were a few critical issues:
- Invalid pointer arithmetics on the input data (char vs. int)
- Invalid logic in the pixel duplication code

All of these due to bad copy and paste :(

Also, use LZ4HC instead of LZ4 when compression is enabled.
ETC1 encoding is so damn slow you won't see the difference between
LZ4 and LZ4HC compression times.
2014-04-18 15:43:07 +09:00
Jean-Philippe Andre f7150570b0 Eet: Use medium quality for ETC1 by default
And remove  dithering.
This is the same as  07700a799c
2014-04-18 15:39:41 +09:00
Jean-Philippe Andre 60d144d963 ETC1 encoding: fix typo in TGV and EET savers
If quality is >30 && <=70 then choose medium params, not low.
Spotted by Snacker, thanks.
2014-04-08 15:58:58 +09:00
Cedric BAIL 83af91c8b8 eet: add negociation colorspace support to Eet. 2014-04-01 22:00:54 +09:00
Cedric BAIL b1e5760811 eet: add internal encoding to ETC1 as an alternate solution to Jpeg. 2014-04-01 22:00:15 +09:00
Carsten Haitzler d12b6e6fa1 fix clang bad free complaint 2013-07-16 18:20:07 +09:00
Stefan Schmidt 92de5dd3c6 evas/eet: Prevent libjpeg to redefine INT32.
The define prevents that INT32 gets redefined in libjpeg while it
already is defined for the mingw build.
2013-07-09 11:19:28 +01:00