| 1 |
/* |
| 2 |
* Copyright 2015 The Etc2Comp Authors. |
| 3 |
* |
| 4 |
* Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 |
* you may not use this file except in compliance with the License. |
| 6 |
* You may obtain a copy of the License at |
| 7 |
* |
| 8 |
* http://www.apache.org/licenses/LICENSE-2.0 |
| 9 |
* |
| 10 |
* Unless required by applicable law or agreed to in writing, software |
| 11 |
* distributed under the License is distributed on an "AS IS" BASIS, |
| 12 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 |
* See the License for the specific language governing permissions and |
| 14 |
* limitations under the License. |
| 15 |
*/ |
| 16 |
|
| 17 |
#pragma once |
| 18 |
|
| 19 |
#include "EtcColor.h" |
| 20 |
#include <stdio.h> |
| 21 |
|
| 22 |
namespace Etc |
| 23 |
{ |
| 24 |
class Analysis; |
| 25 |
class Image; |
| 26 |
class Block4x4; |
| 27 |
|
| 28 |
class Comparison |
| 29 |
{ |
| 30 |
public: |
| 31 |
|
| 32 |
Comparison(Analysis *a_panalysisParent, unsigned int a_uiIndex, const char *a_pstrFilename, int a_iPixelX = -1, int a_iPixelY = -1); |
| 33 |
|
| 34 |
private: |
| 35 |
|
| 36 |
static const float ERROR_EPSILON; |
| 37 |
|
| 38 |
void SetName(void); |
| 39 |
|
| 40 |
void DrawImageComparison(Image *a_pimageUnderTest); |
| 41 |
|
| 42 |
void DrawBlockComparison2x(Block4x4 *a_pblockUnderTest, |
| 43 |
ColorR8G8B8A8 *a_pargba8Output, |
| 44 |
unsigned int a_uiOutputWidth, |
| 45 |
float a_fErrorBlockUnderTest, |
| 46 |
float a_fErrorBlockReference); |
| 47 |
|
| 48 |
void WriteLogFile(void); |
| 49 |
void WriteBetterOrWorseBlocks(FILE *a_pfile, bool a_boolWorse); |
| 50 |
void WriteBlockInfo(FILE *a_pfile, Block4x4 *a_pblock, const char *a_pstrEncoder); |
| 51 |
|
| 52 |
Analysis *m_panalysisParent; |
| 53 |
unsigned int m_uiIndex; |
| 54 |
char *m_pstrFilename; |
| 55 |
Image *m_pimage; |
| 56 |
char *m_pstrName; |
| 57 |
char *m_pstrOutputFolder; |
| 58 |
}; |
| 59 |
|
| 60 |
|
| 61 |
} |