func delta(x, y uint8) uint8 { … } func eq(c0, c1 Color) error { … } // TestYCbCrRoundtrip tests that a subset of RGB space can be converted to YCbCr // and back to within 2/256 tolerance. func TestYCbCrRoundtrip(t *testing.T) { … } // TestYCbCrToRGBConsistency tests that calling the RGBA method (16 bit color) // then truncating to 8 bits is equivalent to calling the YCbCrToRGB function (8 // bit color). func TestYCbCrToRGBConsistency(t *testing.T) { … } // TestYCbCrGray tests that YCbCr colors are a superset of Gray colors. func TestYCbCrGray(t *testing.T) { … } // TestNYCbCrAAlpha tests that NYCbCrA colors are a superset of Alpha colors. func TestNYCbCrAAlpha(t *testing.T) { … } // TestNYCbCrAYCbCr tests that NYCbCrA colors are a superset of YCbCr colors. func TestNYCbCrAYCbCr(t *testing.T) { … } // TestCMYKRoundtrip tests that a subset of RGB space can be converted to CMYK // and back to within 1/256 tolerance. func TestCMYKRoundtrip(t *testing.T) { … } // TestCMYKToRGBConsistency tests that calling the RGBA method (16 bit color) // then truncating to 8 bits is equivalent to calling the CMYKToRGB function (8 // bit color). func TestCMYKToRGBConsistency(t *testing.T) { … } // TestCMYKGray tests that CMYK colors are a superset of Gray colors. func TestCMYKGray(t *testing.T) { … } func TestPalette(t *testing.T) { … } var sink8 … var sink32 … func BenchmarkYCbCrToRGB(b *testing.B) { … } func BenchmarkRGBToYCbCr(b *testing.B) { … } func BenchmarkYCbCrToRGBA(b *testing.B) { … } func BenchmarkNYCbCrAToRGBA(b *testing.B) { … }