MCPcopy Create free account
hub / github.com/defold/defold / color_diff

Function color_diff

engine/dlib/src/basis/encoder/basisu_uastc_enc.cpp:2639–2645  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2637 }
2638
2639 static inline uint64_t color_diff(const ycbcr& a, const ycbcr& b)
2640 {
2641 const int y_delta = a.m_y - b.m_y;
2642 const int cb_delta = a.m_cb - b.m_cb;
2643 const int cr_delta = a.m_cr - b.m_cr;
2644 return ((int64_t)y_delta * y_delta * 4) + ((int64_t)cr_delta * cr_delta) + ((int64_t)cb_delta * cb_delta);
2645 }
2646
2647 static inline int gray_distance2(const color_rgba& c, int r, int g, int b)
2648 {

Callers 1

compute_etc1_hintsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected