summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2014-05-07 14:50:29 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2014-05-27 12:21:37 +0900
commit525bc4117ac8521eacc8bbcf646dec6a6537da3d (patch)
tree6b927c6efb0e71bc5abb63542b07cce7559b16c5
parent03505d1f81535f8cdb295c6fb7b1af3a60b0daa3 (diff)
Evas rg_etc1: Also decode RGBA8 from the TGV loader
-rw-r--r--src/modules/evas/loaders/tgv/evas_image_load_tgv.c17
-rw-r--r--src/static_libs/rg_etc/rg_etc1.h2
2 files changed, 2 insertions, 17 deletions
diff --git a/src/modules/evas/loaders/tgv/evas_image_load_tgv.c b/src/modules/evas/loaders/tgv/evas_image_load_tgv.c
index 30d6ceaef1..7216049962 100644
--- a/src/modules/evas/loaders/tgv/evas_image_load_tgv.c
+++ b/src/modules/evas/loaders/tgv/evas_image_load_tgv.c
@@ -77,9 +77,7 @@ static const Evas_Colorspace cspaces_rgb8_etc2[2] = {
77 77
78static const Evas_Colorspace cspaces_rgba8_etc2_eac[2] = { 78static const Evas_Colorspace cspaces_rgba8_etc2_eac[2] = {
79 EVAS_COLORSPACE_RGBA8_ETC2_EAC, 79 EVAS_COLORSPACE_RGBA8_ETC2_EAC,
80#ifdef HAVE_ETC2_DECODER
81 EVAS_COLORSPACE_ARGB8888 80 EVAS_COLORSPACE_ARGB8888
82#endif
83}; 81};
84 82
85static void * 83static void *
@@ -324,14 +322,6 @@ evas_image_load_file_data_tgv(void *loader_data,
324 // Offset to take duplicated pixels into account 322 // Offset to take duplicated pixels into account
325 master.x += 1; 323 master.x += 1;
326 master.y += 1; 324 master.y += 1;
327#ifndef HAVE_ETC2_DECODER
328 if (loader->cspace == EVAS_COLORSPACE_RGBA8_ETC2_EAC)
329 {
330 fprintf(stderr, "Requested ETC2 to RGBA conversion but there is no decoder\n");
331 *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT;
332 goto on_error;
333 }
334#endif
335 break; 325 break;
336 default: abort(); 326 default: abort();
337 } 327 }
@@ -410,14 +400,9 @@ evas_image_load_file_data_tgv(void *loader_data,
410 case EVAS_COLORSPACE_RGB8_ETC2: 400 case EVAS_COLORSPACE_RGB8_ETC2:
411 rg_etc2_rgb8_decode_block((uint8_t *) it, temporary); 401 rg_etc2_rgb8_decode_block((uint8_t *) it, temporary);
412 break; 402 break;
413#ifdef HAVE_ETC2_DECODER
414 case EVAS_COLORSPACE_RGB8_ETC2:
415 etc2_rgb8_decode_block((uint8_t *) it, (uint8_t *) temporary, 16, 4, 4);
416 break;
417 case EVAS_COLORSPACE_RGBA8_ETC2_EAC: 403 case EVAS_COLORSPACE_RGBA8_ETC2_EAC:
418 etc2_rgba8_decode_block((uint8_t *) it, (uint8_t *) temporary, 16, 4, 4); 404 rg_etc2_rgba8_decode_block((uint8_t *) it, temporary);
419 break; 405 break;
420#endif
421 default: abort(); 406 default: abort();
422 } 407 }
423 408
diff --git a/src/static_libs/rg_etc/rg_etc1.h b/src/static_libs/rg_etc/rg_etc1.h
index 43a86aa3b0..8de77add5e 100644
--- a/src/static_libs/rg_etc/rg_etc1.h
+++ b/src/static_libs/rg_etc/rg_etc1.h
@@ -40,7 +40,7 @@ unsigned int rg_etc1_pack_block(void* pETC1_block, const unsigned int* pSrc_pixe
40void rg_etc2_rgb8_decode_block(const uint8_t *etc_block, uint32_t *bgra); 40void rg_etc2_rgb8_decode_block(const uint8_t *etc_block, uint32_t *bgra);
41 41
42// ETC2 support: RGBA8_ETC2_EAC 42// ETC2 support: RGBA8_ETC2_EAC
43//void rg_etc2_rgba8_decode_block(const uint8_t *etc_block, uint32_t *bgra); 43void rg_etc2_rgba8_decode_block(const uint8_t *etc_block, uint32_t *bgra);
44 44
45//------------------------------------------------------------------------------ 45//------------------------------------------------------------------------------
46// 46//