diff --git a/build/jam/BuildFeatures b/build/jam/BuildFeatures
index 323d2c0d..e29a39c9 100644
a
|
b
|
if [ IsPackageAvailable tiff4_devel ] {
|
566 | 566 | |
567 | 567 | |
568 | 568 | # openexr |
569 | | if [ IsPackageAvailable openexr_devel ] { |
570 | | ExtractBuildFeatureArchives openexr : |
571 | | file: base openexr |
| 569 | if [ IsPackageAvailable openexr30_devel ] { |
| 570 | ExtractBuildFeatureArchives openexr30 : |
| 571 | file: base openexr30 |
572 | 572 | runtime: lib |
573 | | file: devel openexr_devel |
| 573 | file: devel openexr30_devel |
574 | 574 | depends: base |
575 | 575 | libraries: |
576 | | $(developLibDir)/libIlmImf.so |
577 | | $(developLibDir)/libIlmImfUtil.so |
578 | | $(developLibDir)/libHalf.so |
579 | 576 | $(developLibDir)/libIex.so |
580 | | $(developLibDir)/libIexMath.so |
581 | 577 | $(developLibDir)/libIlmThread.so |
582 | 578 | $(developLibDir)/libImath.so |
583 | | headers: $(developHeadersDir) $(developHeadersDir)/OpenEXR |
| 579 | $(developLibDir)/libOpenEXR.so |
| 580 | $(developLibDir)/libOpenEXRUtil.so |
| 581 | headers: $(developHeadersDir) $(developHeadersDir)/OpenEXR $(developHeadersDir)/Imath |
584 | 582 | ; |
585 | 583 | |
586 | | EnableBuildFeatures openexr ; |
| 584 | EnableBuildFeatures openexr30 ; |
587 | 585 | } else { |
588 | | unavailableBuildFeatures += openexr ; |
| 586 | unavailableBuildFeatures += openexr30 ; |
589 | 587 | } |
590 | 588 | |
591 | 589 | |
diff --git a/build/jam/repositories/HaikuPorts/x86_64 b/build/jam/repositories/HaikuPorts/x86_64
index b81791a9..8c6324ee 100644
a
|
b
|
RemotePackageRepository HaikuPorts
|
199 | 199 | nghttp2-1.43.0-1 |
200 | 200 | nghttp2_devel-1.43.0-1 |
201 | 201 | openexr-2.4.1-1 |
202 | | openexr_devel-2.4.1-1 |
203 | 202 | openexr30-3.0.5-1 |
| 203 | openexr30_devel-3.0.5-1 |
204 | 204 | openjpeg-2.4.0-2 |
205 | 205 | openjpeg_devel-2.4.0-2 |
206 | 206 | openssh-9.3p1-1 |
diff --git a/src/add-ons/translators/exr/EXRGamma.cpp b/src/add-ons/translators/exr/EXRGamma.cpp
index cd5384fd..33516c1e 100644
a
|
b
|
using namespace std;
|
16 | 16 | float |
17 | 17 | knee(double x, double f) |
18 | 18 | { |
19 | | return float (Imath::Math<double>::log (x * f + 1) / f); |
| 19 | return float (log (x * f + 1) / f); |
20 | 20 | } |
21 | 21 | |
22 | 22 | |
… |
… |
Gamma::Gamma(float gamma,
|
54 | 54 | float kneeHigh) |
55 | 55 | : |
56 | 56 | g (gamma), |
57 | | m (Imath::Math<float>::pow(2, exposure + 2.47393)), |
| 57 | m (pow(2, exposure + 2.47393)), |
58 | 58 | d (defog), |
59 | | kl (Imath::Math<float>::pow(2, kneeLow)), |
60 | | f (findKneeF (Imath::Math<float>::pow(2, kneeHigh) - kl, |
61 | | Imath::Math<float>::pow(2, 3.5) - kl)), |
62 | | s (255.0 * Imath::Math<float>::pow(2, -3.5 * g)) |
| 59 | kl (pow(2, kneeLow)), |
| 60 | f (findKneeF (pow(2, kneeHigh) - kl, |
| 61 | pow(2, 3.5) - kl)), |
| 62 | s (255.0 * pow(2, -3.5 * g)) |
63 | 63 | { |
64 | 64 | } |
65 | 65 | |
… |
… |
Gamma::operator() (half h)
|
90 | 90 | // Gamma |
91 | 91 | // |
92 | 92 | |
93 | | x = Imath::Math<float>::pow (x, g); |
| 93 | x = pow (x, g); |
94 | 94 | |
95 | 95 | // |
96 | 96 | // Scale and clamp |
diff --git a/src/add-ons/translators/exr/IStreamWrapper.cpp b/src/add-ons/translators/exr/IStreamWrapper.cpp
index 137e13c8..a06c31d0 100644
a
|
b
|
IStreamWrapper::read(char c[/*n*/], int n)
|
29 | 29 | } |
30 | 30 | |
31 | 31 | |
32 | | Int64 |
| 32 | uint64_t |
33 | 33 | IStreamWrapper::tellg() |
34 | 34 | { |
35 | 35 | return fStream.Position(); |
… |
… |
IStreamWrapper::tellg()
|
37 | 37 | |
38 | 38 | |
39 | 39 | void |
40 | | IStreamWrapper::seekg(Int64 pos) |
| 40 | IStreamWrapper::seekg(uint64_t pos) |
41 | 41 | { |
42 | 42 | fStream.Seek(pos, SEEK_SET); |
43 | 43 | } |
diff --git a/src/add-ons/translators/exr/IStreamWrapper.h b/src/add-ons/translators/exr/IStreamWrapper.h
index be2abbda..f13d93b9 100644
a
|
b
|
class IStreamWrapper : public IStream {
|
18 | 18 | virtual ~IStreamWrapper(); |
19 | 19 | |
20 | 20 | virtual bool read(char c[/*n*/], int n); |
21 | | virtual Int64 tellg(); |
22 | | virtual void seekg(Int64 pos); |
| 21 | virtual uint64_t tellg(); |
| 22 | virtual void seekg(uint64_t pos); |
23 | 23 | |
24 | 24 | private: |
25 | 25 | StreamBuffer fStream; |
diff --git a/src/add-ons/translators/exr/Jamfile b/src/add-ons/translators/exr/Jamfile
index ad2b1be2..aacbf9f7 100644
a
|
b
|
AddResources EXRTranslator : EXRTranslator.rdef ;
|
7 | 7 | local architectureObject ; |
8 | 8 | for architectureObject in [ MultiArchSubDirSetup ] { |
9 | 9 | on $(architectureObject) { |
10 | | UseBuildFeatureHeaders openexr ; |
| 10 | UseBuildFeatureHeaders openexr30 ; |
11 | 11 | Includes [ FGristFiles ConfigView.cpp EXRTranslator.cpp EXRGamma.cpp |
12 | 12 | IStreamWrapper.cpp ] |
13 | | : [ BuildFeatureAttribute openexr : headers ] ; |
| 13 | : [ BuildFeatureAttribute openexr30 : headers ] ; |
14 | 14 | |
15 | 15 | Translator [ MultiArchDefaultGristFiles EXRTranslator ] : |
16 | 16 | main.cpp |
… |
… |
for architectureObject in [ MultiArchSubDirSetup ] {
|
20 | 20 | IStreamWrapper.cpp |
21 | 21 | : be translation textencoding [ TargetLibstdc++ ] |
22 | 22 | [ MultiArchDefaultGristFiles libtranslatorsutils.a ] |
23 | | [ BuildFeatureAttribute openexr : libraries ] |
| 23 | [ BuildFeatureAttribute openexr30 : libraries ] |
24 | 24 | localestub |
25 | 25 | : true |
26 | 26 | ; |