diff --git a/RawSpeed/DcrDecoder.cpp b/RawSpeed/DcrDecoder.cpp
index b4b3ecc..39f0e69 100644
--- a/RawSpeed/DcrDecoder.cpp
+++ b/RawSpeed/DcrDecoder.cpp
@@ -59,7 +59,7 @@ RawImage DcrDecoder::decodeRawInternal() {
TiffEntry *ifdoffset = mRootIFD->getEntryRecursive(KODAK_IFD);
if (!ifdoffset)
ThrowRDE("DCR Decoder: Couldn't find the Kodak IFD offset");
- TiffIFDBE kodakifd = TiffIFDBE(mFile, ifdoffset->getInt());
+ TiffIFDSwap kodakifd = TiffIFDSwap(mFile, ifdoffset->getInt());
TiffEntry *linearization = kodakifd.getEntryRecursive(KODAK_LINEARIZATION);
if (!linearization)
ThrowRDE("DCR Decoder: Couldn't find the linearization table");
diff --git a/RawSpeed/DcrDecoder.h b/RawSpeed/DcrDecoder.h
index c59f4f2..5011b68 100644
--- a/RawSpeed/DcrDecoder.h
+++ b/RawSpeed/DcrDecoder.h
@@ -24,7 +24,7 @@
#define DCR_DECODER_H
#include "RawDecoder.h"
-#include "TiffIFDBE.h"
+#include "TiffIFDSwap.h"
namespace RawSpeed {
diff --git a/RawSpeed/ErfDecoder.cpp b/RawSpeed/ErfDecoder.cpp
index 352b391..36dcdcf 100644
--- a/RawSpeed/ErfDecoder.cpp
+++ b/RawSpeed/ErfDecoder.cpp
@@ -1,5 +1,6 @@
#include "StdAfx.h"
#include "ErfDecoder.h"
+#include "TiffIFDSwap.h"
/*
RawSpeed - RAW file decoder.
diff --git a/RawSpeed/ErfDecoder.h b/RawSpeed/ErfDecoder.h
index 5dffecc..d0baf79 100644
--- a/RawSpeed/ErfDecoder.h
+++ b/RawSpeed/ErfDecoder.h
@@ -24,7 +24,6 @@
#define ERF_DECODER_H
#include "RawDecoder.h"
-#include "TiffIFDBE.h"
namespace RawSpeed {
diff --git a/RawSpeed/KdcDecoder.h b/RawSpeed/KdcDecoder.h
index e2f3bbb..5e76819 100644
--- a/RawSpeed/KdcDecoder.h
+++ b/RawSpeed/KdcDecoder.h
@@ -24,7 +24,7 @@
#define KDC_DECODER_H
#include "RawDecoder.h"
-#include "TiffIFDBE.h"
+#include "TiffIFDSwap.h"
namespace RawSpeed {
diff --git a/RawSpeed/OrfDecoder.cpp b/RawSpeed/OrfDecoder.cpp
index 602916a..75d1ac6 100644
--- a/RawSpeed/OrfDecoder.cpp
+++ b/RawSpeed/OrfDecoder.cpp
@@ -352,7 +352,7 @@ void OrfDecoder::decodeMetaDataInternal(CameraMetaData *meta) {
if (makertiff.getHostEndian() == makertiff.tiff_endian)
ImageProcessing = new TiffIFD(&makermap2, offset);
else
- ImageProcessing = new TiffIFDBE(&makermap2, offset);
+ ImageProcessing = new TiffIFDSwap(&makermap2, offset);
blackEntry = ImageProcessing->getEntry((TiffTag)0x600);
} catch (TiffParserException) {
}
diff --git a/RawSpeed/RawParser.cpp b/RawSpeed/RawParser.cpp
index 7ef862e..60ad630 100644
--- a/RawSpeed/RawParser.cpp
+++ b/RawSpeed/RawParser.cpp
@@ -4,7 +4,7 @@
#include "TiffParser.h"
#include "X3fParser.h"
#include "ByteStreamSwap.h"
-#include "TiffEntryBE.h"
+#include "TiffEntrySwap.h"
#include "MrwDecoder.h"
/*
@@ -161,7 +161,7 @@ void RawParser::ParseFuji(uint32 offset, TiffIFD *target_ifd)
case 0x100:
case 0x121:
case 0x2ff0:
- t = new TiffEntryBE((TiffTag)tag, TIFF_SHORT, length/2, bytes.getData());
+ t = new TiffEntrySwap((TiffTag)tag, TIFF_SHORT, length/2, bytes.getData());
break;
case 0xc000:
diff --git a/RawSpeed/RawSpeed.vcproj b/RawSpeed/RawSpeed.vcproj
index 5692a21..e1d9856 100644
--- a/RawSpeed/RawSpeed.vcproj
+++ b/RawSpeed/RawSpeed.vcproj
@@ -230,7 +230,7 @@
>
getDataWrt(offset);
@@ -57,7 +57,7 @@ TiffEntryBE::TiffEntryBE(FileMap* f, uint32 offset) {
#endif
}
-TiffEntryBE::TiffEntryBE( TiffTag tag, TiffDataType type, uint32 count, const uchar8* data /*= NULL*/ )
+TiffEntrySwap::TiffEntrySwap( TiffTag tag, TiffDataType type, uint32 count, const uchar8* data /*= NULL*/ )
: TiffEntry(tag, type,count, data)
{
#ifdef _DEBUG
@@ -71,10 +71,10 @@ TiffEntryBE::TiffEntryBE( TiffTag tag, TiffDataType type, uint32 count, const uc
#endif
}
-TiffEntryBE::~TiffEntryBE(void) {
+TiffEntrySwap::~TiffEntrySwap(void) {
}
-unsigned int TiffEntryBE::getInt() {
+unsigned int TiffEntrySwap::getInt() {
if (!(type == TIFF_LONG || type == TIFF_SHORT || type == TIFF_UNDEFINED))
ThrowTPE("TIFF, getInt: Wrong type 0x%x encountered. Expected Int", type);
if (type == TIFF_SHORT)
@@ -82,13 +82,13 @@ unsigned int TiffEntryBE::getInt() {
return (unsigned int)data[0] << 24 | (unsigned int)data[1] << 16 | (unsigned int)data[2] << 8 | (unsigned int)data[3];
}
-unsigned short TiffEntryBE::getShort() {
+unsigned short TiffEntrySwap::getShort() {
if (!(type == TIFF_SHORT || type == TIFF_UNDEFINED))
ThrowTPE("TIFF, getShort: Wrong type 0x%x encountered. Expected Short", type);
return (unsigned short)data[0] << 8 | (unsigned short)data[1];
}
-const uint32* TiffEntryBE::getIntArray() {
+const uint32* TiffEntrySwap::getIntArray() {
if (!(type == TIFF_LONG || type == TIFF_UNDEFINED || type == TIFF_RATIONAL || type == TIFF_SRATIONAL))
ThrowTPE("TIFF, getIntArray: Wrong type 0x%x encountered. Expected Int", type);
if (own_data)
@@ -107,7 +107,7 @@ const uint32* TiffEntryBE::getIntArray() {
return (uint32*)own_data;
}
-const ushort16* TiffEntryBE::getShortArray() {
+const ushort16* TiffEntrySwap::getShortArray() {
if (!(type == TIFF_SHORT || type == TIFF_UNDEFINED))
ThrowTPE("TIFF, getShortArray: Wrong type 0x%x encountered. Expected Short", type);
@@ -122,7 +122,7 @@ const ushort16* TiffEntryBE::getShortArray() {
return d;
}
-void TiffEntryBE::setData( const void *in_data, uint32 byte_count )
+void TiffEntrySwap::setData( const void *in_data, uint32 byte_count )
{
if (datashifts[type] != 0)
ThrowTPE("TIFF, Unable to set data on byteswapped platforms (unsupported)");
diff --git a/RawSpeed/TiffEntryBE.h b/RawSpeed/TiffEntrySwap.h
similarity index 82%
rename from RawSpeed/TiffEntryBE.h
rename to RawSpeed/TiffEntrySwap.h
index 12197f0..cfb68be 100644
--- a/RawSpeed/TiffEntryBE.h
+++ b/RawSpeed/TiffEntrySwap.h
@@ -27,14 +27,14 @@
namespace RawSpeed {
-class TiffEntryBE :
+class TiffEntrySwap :
public TiffEntry
{
public:
-// TiffEntryBE(void);
- TiffEntryBE(FileMap* f, uint32 offset);
- TiffEntryBE(TiffTag tag, TiffDataType type, uint32 count, const uchar8* data = NULL);
- virtual ~TiffEntryBE(void);
+// TiffEntrySwap(void);
+ TiffEntrySwap(FileMap* f, uint32 offset);
+ TiffEntrySwap(TiffTag tag, TiffDataType type, uint32 count, const uchar8* data = NULL);
+ virtual ~TiffEntrySwap(void);
virtual uint32 getInt();
virtual ushort16 getShort();
virtual const uint32* getIntArray();
diff --git a/RawSpeed/TiffIFD.cpp b/RawSpeed/TiffIFD.cpp
index 4254f98..0e16273 100644
--- a/RawSpeed/TiffIFD.cpp
+++ b/RawSpeed/TiffIFD.cpp
@@ -235,7 +235,7 @@ TiffIFD* TiffIFD::parseMakerNote(FileMap *f, uint32 offset, Endianness parent_en
if (parent_end == getHostEndianness())
maker_ifd = new TiffIFD(mFile, offset);
else
- maker_ifd = new TiffIFDBE(mFile, offset);
+ maker_ifd = new TiffIFDSwap(mFile, offset);
} catch (...) {
if (mFile != f)
delete mFile;
diff --git a/RawSpeed/TiffIFDBE.cpp b/RawSpeed/TiffIFDSwap.cpp
similarity index 86%
rename from RawSpeed/TiffIFDBE.cpp
rename to RawSpeed/TiffIFDSwap.cpp
index 3cce15c..506e697 100644
--- a/RawSpeed/TiffIFDBE.cpp
+++ b/RawSpeed/TiffIFDSwap.cpp
@@ -1,6 +1,6 @@
#include "StdAfx.h"
-#include "TiffIFDBE.h"
-#include "TiffEntryBE.h"
+#include "TiffIFDSwap.h"
+#include "TiffEntrySwap.h"
/*
RawSpeed - RAW file decoder.
@@ -25,11 +25,11 @@
namespace RawSpeed {
-TiffIFDBE::TiffIFDBE() {
+TiffIFDSwap::TiffIFDSwap() {
endian = big;
}
-TiffIFDBE::TiffIFDBE(FileMap* f, uint32 offset) {
+TiffIFDSwap::TiffIFDSwap(FileMap* f, uint32 offset) {
mFile = f;
endian = big;
int entries;
@@ -40,7 +40,7 @@ TiffIFDBE::TiffIFDBE(FileMap* f, uint32 offset) {
CHECKSIZE(offset + 2 + entries*4);
for (int i = 0; i < entries; i++) {
- TiffEntryBE *t = new TiffEntryBE(f, offset + 2 + i*12);
+ TiffEntrySwap *t = new TiffEntrySwap(f, offset + 2 + i*12);
if (t->tag == SUBIFDS || t->tag == EXIFIFDPOINTER || t->tag == DNGPRIVATEDATA || t->tag == MAKERNOTE) { // subIFD tag
if (t->tag == DNGPRIVATEDATA) {
@@ -64,7 +64,7 @@ TiffIFDBE::TiffIFDBE(FileMap* f, uint32 offset) {
const unsigned int* sub_offsets = t->getIntArray();
try {
for (uint32 j = 0; j < t->count; j++) {
- mSubIFD.push_back(new TiffIFDBE(f, sub_offsets[j]));
+ mSubIFD.push_back(new TiffIFDSwap(f, sub_offsets[j]));
}
delete(t);
} catch (TiffParserException) {
@@ -81,7 +81,7 @@ TiffIFDBE::TiffIFDBE(FileMap* f, uint32 offset) {
}
-TiffIFDBE::~TiffIFDBE(void) {
+TiffIFDSwap::~TiffIFDSwap(void) {
}
} // namespace RawSpeed
diff --git a/RawSpeed/TiffIFDBE.h b/RawSpeed/TiffIFDSwap.h
similarity index 87%
rename from RawSpeed/TiffIFDBE.h
rename to RawSpeed/TiffIFDSwap.h
index 2dd5ceb..ac50a43 100644
--- a/RawSpeed/TiffIFDBE.h
+++ b/RawSpeed/TiffIFDSwap.h
@@ -26,13 +26,13 @@
namespace RawSpeed {
-class TiffIFDBE :
+class TiffIFDSwap :
public TiffIFD
{
public:
- TiffIFDBE();
- TiffIFDBE(FileMap* f, uint32 offset);
- virtual ~TiffIFDBE(void);
+ TiffIFDSwap();
+ TiffIFDSwap(FileMap* f, uint32 offset);
+ virtual ~TiffIFDSwap(void);
};
} // namespace RawSpeed
diff --git a/RawSpeed/TiffParser.cpp b/RawSpeed/TiffParser.cpp
index cae1800..a378ca1 100644
--- a/RawSpeed/TiffParser.cpp
+++ b/RawSpeed/TiffParser.cpp
@@ -87,7 +87,7 @@ void TiffParser::parseData() {
if (tiff_endian == host_endian)
mRootIFD = new TiffIFD();
else
- mRootIFD = new TiffIFDBE();
+ mRootIFD = new TiffIFDSwap();
uint32 nextIFD;
data = mInput->getData(4);
@@ -102,7 +102,7 @@ void TiffParser::parseData() {
if (tiff_endian == host_endian)
mRootIFD->mSubIFD.push_back(new TiffIFD(mInput, nextIFD));
else
- mRootIFD->mSubIFD.push_back(new TiffIFDBE(mInput, nextIFD));
+ mRootIFD->mSubIFD.push_back(new TiffIFDSwap(mInput, nextIFD));
nextIFD = mRootIFD->mSubIFD.back()->getNextIFD();
}
diff --git a/RawSpeed/TiffParser.h b/RawSpeed/TiffParser.h
index c555e83..e57c3db 100644
--- a/RawSpeed/TiffParser.h
+++ b/RawSpeed/TiffParser.h
@@ -25,7 +25,7 @@
#include "FileMap.h"
#include "TiffIFD.h"
-#include "TiffIFDBE.h"
+#include "TiffIFDSwap.h"
#include "TiffParserException.h"
#include "RawDecoder.h"
diff --git a/RawSpeed/TiffParserHeaderless.cpp b/RawSpeed/TiffParserHeaderless.cpp
index aa77d39..975e5f7 100644
--- a/RawSpeed/TiffParserHeaderless.cpp
+++ b/RawSpeed/TiffParserHeaderless.cpp
@@ -53,7 +53,7 @@ void TiffParserHeaderless::parseData(uint32 firstIfdOffset) {
if (tiff_endian == host_endian)
mRootIFD = new TiffIFD();
else
- mRootIFD = new TiffIFDBE();
+ mRootIFD = new TiffIFDSwap();
uint32 nextIFD = firstIfdOffset;
do {
@@ -62,7 +62,7 @@ void TiffParserHeaderless::parseData(uint32 firstIfdOffset) {
if (tiff_endian == host_endian)
mRootIFD->mSubIFD.push_back(new TiffIFD(mInput, nextIFD));
else
- mRootIFD->mSubIFD.push_back(new TiffIFDBE(mInput, nextIFD));
+ mRootIFD->mSubIFD.push_back(new TiffIFDSwap(mInput, nextIFD));
nextIFD = mRootIFD->mSubIFD.back()->getNextIFD();
} while (nextIFD);
diff --git a/RawSpeed/TiffParserOlympus.cpp b/RawSpeed/TiffParserOlympus.cpp
index 3e8d437..26d1766 100644
--- a/RawSpeed/TiffParserOlympus.cpp
+++ b/RawSpeed/TiffParserOlympus.cpp
@@ -60,7 +60,7 @@ void TiffParserOlympus::parseData() {
if (tiff_endian == host_endian)
mRootIFD = new TiffIFD();
else
- mRootIFD = new TiffIFDBE();
+ mRootIFD = new TiffIFDSwap();
uint32 nextIFD = 4; // Skip Endian and magic
do {
@@ -69,7 +69,7 @@ void TiffParserOlympus::parseData() {
if (tiff_endian == host_endian)
mRootIFD->mSubIFD.push_back(new TiffIFD(mInput, nextIFD));
else
- mRootIFD->mSubIFD.push_back(new TiffIFDBE(mInput, nextIFD));
+ mRootIFD->mSubIFD.push_back(new TiffIFDSwap(mInput, nextIFD));
nextIFD = mRootIFD->mSubIFD.back()->getNextIFD();
} while (nextIFD);