Commit Graph

107 Commits

Author SHA1 Message Date
Carsten Haitzler 10405ffc41 evas - ico loader - detect probable p0ng entry in ico file
ico files were defined to have bmp's in each key - in fact a subset of
them. unbenknownst to yours truly, vista now allows them to also be
pngs and thus the ico loader rejects them as corrupt. at least detect
it and complain right now
2014-07-24 17:18:35 +09:00
Carsten Haitzler dee1640d0f fix some formatting in ico loader 2014-07-24 15:22:40 +09:00
Jean-Philippe Andre 6deda1a722 Evas TGV: Fix compilation with BUILD_NEON
The TGV loader is an Evas_Loader, not part of evas itself
(eg. in cserve), so we can't use evas functions from there.
eina_cpu provides appropriate CPU features detection.
2014-07-09 09:04:55 +09:00
Jean-Philippe Andre 0bba7422cb Evas TGV: Add support for ETC1+Alpha
Save images with alpha in two planes:
- RGB data as ETC1
- Alpha as ETC1 (from a greyscale image)

The second plane alpha is located right after the RGB plane.

The RGBA data is not premultiplied, so that RGB can be encoded
at a better quality in ETC1. This should avoid some blockiness
artifacts that we can see in the current ETC2 mode (which supports
alpha natively). Eventually ETC2 should also support non
premultiplied data for a better encoding quality.

This patch implements the saver and the loader.

@feature
2014-07-09 09:04:55 +09:00
Wonguk Jeong 1cc23d4ff2 evas: jpeg loader - support flip, transpose, transverse
Summary:
Previously, jpeg image loader support rotation (90°, 180°, 270°) only.
this patch is about supporting flip(vertical, horizontal), transpose, transverse

@feature

Test Plan: I'm going to make tests in src/tests

Reviewers: cedric, raster, jpeg

CC: seoz, cedric

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

Signed-off-by: Cedric BAIL <c.bail@partner.samsung.com>
2014-07-06 20:12:31 +02:00
Jean-Philippe Andre b0df307927 Evas gl: Add support for S3TC textures
Add support for DXT1, DXT3 and DXT5 textures (4 formats in total).

@feature Add support for S3TC textures if the GPU supports them
2014-07-03 15:36:22 +09:00
Jean-Philippe Andre 81929e3404 Evas: Complete DDS loader with direct S3TC data load
This requires block flip (could be repeat, but flip is just as fast).
2014-07-03 11:37:48 +09:00
Jean-Philippe Andre 79ed3c4516 Evas DDS: Implement support for DXT4 and DXT5 2014-07-03 11:37:48 +09:00
Jean-Philippe Andre d9d0ff2088 Evas DDS: Implement decoding of DXT2 and DXT3 2014-07-03 11:37:48 +09:00
Jean-Philippe Andre 18e969f644 Evas DDS: Implement DXT1 to RGBA decoding 2014-07-03 11:37:48 +09:00
Jean-Philippe Andre 8c8a4d37f9 Evas DDS: Start implementing DDS file loader
This implement the header read.
2014-07-03 11:37:48 +09:00
Jean-Philippe Andre c424153867 Evas: Add DDS image file loader
@feature: Add a Micrsoft DirectDraw Surface file loader
2014-07-03 11:37:48 +09:00
Jean-Philippe Andre 2b191b3c51 Evas loader: Introduce border param 2014-07-03 11:37:47 +09:00
wonguk.jeong 7754f3e87f evas: fix jpeg loader rotation by metadata (exif)
Summary:
90 or 270 degree rotation is not working properly
width should be regarded as height, and vice versa.

if this patch and D1082 were commited, rotation from metadata will be working properly by using evas_object_image_load_orientation_set()

@fix

Test Plan: add image object and invoke evas_object_image_load_orientation_set() -> load file with orientation metadata -> check whether image is rotated properly or not

Reviewers: raster, cedric, jpeg

CC: seoz, cedric

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

Signed-off-by: Cedric Bail <cedric.bail@free.fr>
2014-06-29 15:04:21 +02:00
wonguk.jeong 87b8339b81 jpeg loader: exif parsing bug fix
Summary:
problem: orientation information was not come out properly

byte align value was wrong. 0x4949 is II not MM

refer to http://www.media.mit.edu/pia/Research/deepview/exif.html

@fix

Reviewers: raster, cedric, jpeg

CC: seoz, cedric

Differential Revision: https://phab.enlightenment.org/D1082
2014-06-29 13:10:16 +02:00
ChunEon Park 5ade5ca433 evas/png - better way to support png grayscale with transparency format.
suggested by cedric.
2014-06-26 17:00:37 +09:00
Jean-Philippe Andre c64ea71dbe Evas: Fix potential resource leak in the TGV loader
The map would eventually be freed when closing the image.
But still...
2014-06-19 10:28:01 +09:00
Jean-Philippe Andre 5b1ed78605 Evas: Fix some comments in the TGV loader 2014-06-19 10:28:01 +09:00
Jean-Philippe Andre ef80047ac9 Evas TGV: Optimize loader using NEON intrinsics
This can speed up the load a little (but I forgot the numbers).
Patch by Vladimir Kuramshin.
2014-06-12 17:47:56 +09:00
Jean-Philippe Andre dbd576b858 Evas gl: Enable texture atlasses with ETC1/2
We prefer ETC2 textures when ETC2 support has been detected.
According to the spec, glCompressedTexSubImage2D should work
for ETC2.

Try even with ETC1. This may fail at runtime. The fallback path
is very dubious right now but without a proper test case I'm
not sure which approach to take.

We can also imagine cases where the GPU supports TexSubImage for
ETC1 but ETC2 is not supported at all. This will need testing, as
this case is not handled.

@feature
2014-06-12 14:47:16 +09:00
Doug Newgard 096ae0e86f Evas: Update for giflib 5.1 api change
Summary: Slight change in the file close function.

Reviewers: jpeg

CC: cedric

Differential Revision: https://phab.enlightenment.org/D916
2014-05-30 08:32:26 +09:00
Carsten Haitzler 06c7fee700 evas loader - redo gif fix so it doesn't break everything
this fixes 96f9353f4c so it works right
@fix
2014-05-29 17:06:50 +09:00
Carsten Haitzler 20c350b9ef Revert "Evas: gif decoding bug fix"
This reverts commit 96f9353f4c.

This breaks gif playing BAAAADLY!
2014-05-29 14:21:54 +09:00
Jean-Philippe Andre 525bc4117a Evas rg_etc1: Also decode RGBA8 from the TGV loader 2014-05-27 12:21:37 +09:00
Jean-Philippe Andre 4e358a582e Evas rg_etc2: Use new ETC2 decoder for RGB8_ETC2
Alpha support is still a TODO.
2014-05-27 12:21:30 +09:00
Jérémy Zurcher f8c2c57406 do not use EINA_FALSE instead of NULL 2014-05-07 17:45:11 +02:00
Jean-Philippe Andre 8c2e98b840 Evas: Fix wrong comment 2014-04-29 09:03:40 +09:00
Jean-Philippe Andre ef3a36626f Evas: Add support for ETC2 in the TGV loader
There is an ifdef HAVE_ETC2_DECODER to disable unimplemented code.

Since these ETC2 decoding function are not implemented yet,
they should be disabled at compile time.

Yes, this means Evas will not be able to load those images in case
of SW engine or GL engine w/o ETC2 support.

@feature
2014-04-25 16:50:29 +09:00
Jaeun Choi 96f9353f4c Evas: gif decoding bug fix
Gif decoder decodes prior frames sequentially to decode a specific frame.
The last frame of sequential decoding, which is the frame we want to decode,
remains un-decoded until the while loop stops.
The frame count should be incremented after the comparison statement.
2014-04-25 15:26:48 +09:00
Cedric Bail 82b2c8df9e evas: fix TGV loader to not leak ressource.
CID 1195443.
2014-04-17 21:18:32 +02:00
Carsten Haitzler 9e100627a7 fix recent png loader break with etc1 support that broke interlaced imgs
this fixes the png loader code to use png_read_row properly with the
number of passes needed to load aninterlaced image as well as handling
this right with scale ratio scaledown set.
2014-04-15 17:56:07 +09:00
Jean-Philippe Andre 3cb7b19608 Evas: Fix harmless typo in eet image loader
Spotted by Snacker, thanks.
2014-04-04 18:07:12 +09:00
Jean-Philippe Andre b439b8c9be Evas: Fix TGV loader to properly copy ETC1 data
There was some invalid arithmetics with the buffer offset.
2014-04-04 10:08:09 +09:00
Cedric BAIL 4c390fb984 evas: fix use of unitialized data in eet loader.
should fix T1144.
2014-04-02 14:23:49 +09:00
Cedric BAIL 36321b872e evas: make eet negociate it's colorspace with evas. 2014-04-01 22:00:54 +09:00
Cedric BAIL 5140ef6bc4 evas: follow change 2fd69743f9 in the saver. 2014-04-01 22:00:47 +09:00
Cedric BAIL 6988a38a7b evas: fix png loader to actually produce lower resolution content when asked. 2014-04-01 22:00:15 +09:00
Cedric BAIL 641576f7f8 evas: add png support for other color space output. 2014-04-01 22:00:15 +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
Cedric BAIL e47dbc02ea evas: let TGV loader choose which encoding it want.
If region is specified we will not allow ETC1 colorspace as it would
basically break at the frontier as we would be unable to generate a
duplicate of the border as GPU require if you want nice and correct
rendering. So no region and ETC1 output at the same time.
2014-04-01 22:00:15 +09:00
Cedric BAIL 961ecab040 evas: add a tgv loader.
The TGV file format is specifically created for Evas. It is designed to allow
region decompression and parallele decompression with a fast path for GPU that
do handle ETC1 compression. Plan for adding other compression method will come
later.
2014-04-01 22:00:13 +09:00
Jean-Philippe Andre e7e3f73bbe Gif: Fix animated gifs when used as proxy sources
This looks like a typo: if (animated > 1) when animated is a... Bool!

So, I am not entirely sure why this bug is visible in case of gif
proxies, all it seems that the load_data function may be called
multiple times when the object is visible. So gif close and reopen
happen properly, and the first frame can be decoded.
2014-02-17 16:59:43 +09:00
Cedric BAIL 1929637aa0 evas: no loader should ever close an Eina_File anymore.
This would lead to some crash in EFM if relying on Evas to find the file format by
trying all its loader.

This should fix T674 and T668.
2013-12-20 15:10:16 +09:00
Carsten Haitzler 846bbafbfb evas - jpg loader - speed up header check for pgoressive jpgs 2013-12-20 14:14:52 +09:00
Guillaume Friloux 8937708e43 Fix coding style madness. 2013-12-19 11:12:46 +01:00
Carsten Haitzler 8f876cfe72 evas - fix gif loader drop of image data sometimes (image dump/flush)
stable release - cherry-pick me!

this fixses some still gifs going missing.
2013-12-12 18:42:13 +09:00
Carsten Haitzler 22da09105d evas gif loader - address animated always being true
this addresses CID 1135790 and removes useless checks.
2013-12-11 18:10:15 +09:00
Carsten Haitzler 9a3294d1cb gif loader - handle theoretical NULL loader_data case 2013-12-11 09:23:09 +09:00
Carsten Haitzler 3047ec4d91 evas - fix gif loader cpu overuse - used too much cpu to decode anims
stable release - cherry-pick me!

the evas gif loader used way too much cpu to decode animated gifs
because in the rewrite that made it correct, it did not store the
current gif file handle and state, thus each frame it would have to
decode all frames before that one before finally decoding the final
one. that means to decode frame 200, it decoded frame 1, 2, 3, 4 etc.
all the way up to 199 THEN decoded 200 on top, so decode cost became
progressively more then further through the animation you were.

this fixes that by storing state and file handle and allowing you to
iterate through.
2013-12-10 16:38:23 +09:00
Cedric Bail 885222f22d evas: fix loader to properly define _XOPEN_SOURCE for Solaris. 2013-12-04 18:33:04 +09:00