-
Notifications
You must be signed in to change notification settings - Fork 626
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add b44ExpLogTable.h and dwaLookups.h as official headers
- remove auto-generation of the header tables - add test to IlmImfTest to validate the headers Signed-off-by: Cary Phillips <[email protected]>
- Loading branch information
Showing
12 changed files
with
115,307 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// | ||
// SPDX-License-Identifier: BSD-3-Clause | ||
// Copyright Contributors to the OpenEXR Project. | ||
// | ||
|
||
#include <ImfNamespace.h> | ||
#include <half.h> | ||
#include <math.h> | ||
#include <iostream> | ||
#include <iomanip> | ||
#include <assert.h> | ||
|
||
using namespace std; | ||
|
||
|
||
OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER | ||
|
||
extern const unsigned short expTable[]; | ||
extern const unsigned short logTable[]; | ||
|
||
OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT | ||
|
||
void | ||
testB44ExpLogTable (const string&) | ||
{ | ||
const int iMax = (1 << 16); | ||
|
||
for (int i = 0; i < iMax; i++) | ||
{ | ||
half h; | ||
h.setBits (i); | ||
|
||
if (!h.isFinite()) | ||
h = 0; | ||
else if (h >= 8 * log (HALF_MAX)) | ||
h = HALF_MAX; | ||
else | ||
h = exp (h / 8); | ||
|
||
assert (OPENEXR_IMF_INTERNAL_NAMESPACE::expTable[i] == h.bits()); | ||
} | ||
|
||
for (int i = 0; i < iMax; i++) | ||
{ | ||
half h; | ||
h.setBits (i); | ||
|
||
if (!h.isFinite() || h < 0) | ||
h = 0; | ||
else | ||
h = 8 * log (h); | ||
|
||
assert (OPENEXR_IMF_INTERNAL_NAMESPACE::logTable[i] == h.bits()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// | ||
// SPDX-License-Identifier: BSD-3-Clause | ||
// Copyright Contributors to the OpenEXR Project. | ||
// | ||
|
||
void testB44ExpLogTable (const std::string&); | ||
|
Oops, something went wrong.