Adjusted Doxyfile to scan less files.
[fic.git] / modules / quality2SE.h
blobca67ae3be78ef70fa511f9cf206f76ef7ddaf2a3
1 #ifndef QUALITY2SE_HEADER_
2 #define QUALITY2SE_HEADER_
4 #include "../interfaces.h"
6 /** Standard quality-to-SE module - uses fixed SE for all block sizes */
7 class MQuality2SE_std: public IQuality2SE {
9 DECLARE_TypeInfo_noSettings( MQuality2SE_std, "Constant square error"
10 , "Holds the same <b>square error</b> (SE) for all block sizes" )
12 public:
13 /** \name IQuality2SE interface
14 * @{ */
15 float rangeSE(float quality,int /*pixelCount*/) {
16 ASSERT( quality>=0 && quality<=1 );
17 float maxSE= 4 /// approximate SE for quality=0
18 , doubles= 6; ///< how many times the SE doubles
19 return maxSE/exp2(doubles) * ( exp2((1-quality)*doubles) - 1 );
21 /// @}
25 #endif // QUALITY2SE_HEADER_