summaryrefslogtreecommitdiff
path: root/src/static_libs/rg_etc/rg_etc1.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/static_libs/rg_etc/rg_etc1.c')
-rw-r--r--src/static_libs/rg_etc/rg_etc1.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/static_libs/rg_etc/rg_etc1.c b/src/static_libs/rg_etc/rg_etc1.c
index 32d3f9e..1b36889 100644
--- a/src/static_libs/rg_etc/rg_etc1.c
+++ b/src/static_libs/rg_etc/rg_etc1.c
@@ -2216,6 +2216,7 @@ rg_etc1_pack_block_solid_color(unsigned char *block, const uint8* pColor, rg_etc
2216 return best_error; 2216 return best_error;
2217} 2217}
2218 2218
2219#if 0
2219static uint 2220static uint
2220rg_etc1_pack_block_solid_color_constrained(rg_etc1_optimizer_results *results,uint num_colors, 2221rg_etc1_pack_block_solid_color_constrained(rg_etc1_optimizer_results *results,uint num_colors,
2221 const uint8* pColor, rg_etc1_pack_params *pack_params EINA_UNUSED, 2222 const uint8* pColor, rg_etc1_pack_params *pack_params EINA_UNUSED,
@@ -2344,6 +2345,7 @@ rg_etc1_pack_block_solid_color_constrained(rg_etc1_optimizer_results *results,ui
2344 } 2345 }
2345 return best_error; 2346 return best_error;
2346} 2347}
2348#endif
2347 2349
2348// Function originally from RYG's public domain real-time DXT1 compressor, modified for 555. 2350// Function originally from RYG's public domain real-time DXT1 compressor, modified for 555.
2349static void 2351static void
@@ -2489,10 +2491,13 @@ rg_etc1_pack_block(void* pETC1_block, const unsigned int* pSrc_pixels_rgba, rg_e
2489 } 2491 }
2490 2492
2491 results[2].m_error = cUINT64_MAX; 2493 results[2].m_error = cUINT64_MAX;
2494
2495#if 0
2496 // This feature is disabled because it will produce some visual artifacts
2492 if ((params.base_params->m_quality >= rg_etc1_medium_quality) && ((subblock) || (use_color4))) 2497 if ((params.base_params->m_quality >= rg_etc1_medium_quality) && ((subblock) || (use_color4)))
2493 { 2498 {
2494 const uint32 subblock_pixel0_u32 = subblock_pixels[0].m_u32; 2499 const uint32 subblock_pixel0_u32 = subblock_pixels[0].m_u32;
2495 for (r = 7; r >= 0; --r) 2500 for (r = 7; r >= 1; --r)
2496 if (subblock_pixels[r].m_u32 != subblock_pixel0_u32) 2501 if (subblock_pixels[r].m_u32 != subblock_pixel0_u32)
2497 break; 2502 break;
2498 if (!r) 2503 if (!r)
@@ -2503,6 +2508,7 @@ rg_etc1_pack_block(void* pETC1_block, const unsigned int* pSrc_pixels_rgba, rg_e
2503 (subblock && !use_color4) ? &results[0].m_block_color_unscaled : NULL); 2508 (subblock && !use_color4) ? &results[0].m_block_color_unscaled : NULL);
2504 } 2509 }
2505 } 2510 }
2511#endif
2506 2512
2507 params.m_use_color4 = (use_color4 != 0); 2513 params.m_use_color4 = (use_color4 != 0);
2508 params.m_constrain_against_base_color5 = EINA_FALSE; 2514 params.m_constrain_against_base_color5 = EINA_FALSE;