Code clean up and add initial support to run tests in CI enviroment

This commit is contained in:
jfmcarreira committed 2021-10-11 23:07:08 +01:00
1 parent 366d69b5c9
commit 1c1afa7bfc
10 files changed
+216 -29

No files matched your search

+19
View File
@@ -141,6 +141,25 @@ CalypPixel CalypPixel::operator*( const double& op ) const
return result;
}
auto CalypPixel::operator==( const CalypPixel& other ) const -> bool
{
return colorSpace() == other.colorSpace() &&
std::equal( m_pelComp.begin(), m_pelComp.end(), other.components().begin() );
}
std::ostream& operator<<( std::ostream& os, const CalypPixel& p )
{
if( p.colorSpace() == CLP_COLOR_RGB || p.colorSpace() == CLP_COLOR_YUV )
{
os << "(" << p[0] << ", " << p[1] << ", " << p[2] << ")";
}
else
{
os << "(" << p[0] << ", " << p[1] << ", " << p[2] << ", " << p[3] << ")";
}
return os;
}
CalypPixel CalypPixel::convertPixel( CalypColorSpace eOutputSpace ) const
{
if( m_colorSpace == eOutputSpace )