OSDN Git Service

Remove unused functions
authorChih-Wei Huang <cwhuang@linux.org.tw>
Wed, 13 Mar 2019 02:40:11 +0000 (10:40 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Wed, 13 Mar 2019 02:40:11 +0000 (10:40 +0800)
s2tc_algorithm.cpp

index 350f253..4173e21 100644 (file)
@@ -51,18 +51,10 @@ namespace
        {
                signed char r, g, b;
        };
-       inline color_t make_color_t()
-       {
-               return (color_t) {0, 0, 0};
-       }
        inline color_t make_color_t(signed char r_, signed char g_, signed char b_)
        {
                return (color_t) {r_, g_, b_};
        }
-       inline color_t make_color_t(int i)
-       {
-               return (color_t) {(signed char)(i >> 3), (signed char)(i >> 2), (signed char)(i >> 3)};
-       }
        inline bool operator==(const color_t &a, const color_t &b)
        {
                return a.r == b.r && a.g == b.g && a.b == b.b;
@@ -487,27 +479,11 @@ namespace
        {
                return comp;
        }
-       template<> inline int refine_component_encode<color_dist_srgb>(int comp)
-       {
-               return comp * comp;
-       }
-       template<> inline int refine_component_encode<color_dist_srgb_mixed>(int comp)
-       {
-               return comp * comp;
-       }
 
        template<ColorDistFunc ColorDist> inline int refine_component_decode(int comp)
        {
                return comp;
        }
-       template<> inline int refine_component_decode<color_dist_srgb>(int comp)
-       {
-               return sqrtf(comp) + 0.5f;
-       }
-       template<> inline int refine_component_decode<color_dist_srgb_mixed>(int comp)
-       {
-               return sqrtf(comp) + 0.5f;
-       }
 
        template <class T, class Big, int scale_l>
        struct s2tc_evaluate_colors_result_t;