projects
/
goodguy
/
history.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
compiler issues, warnings, makefile spiffs
[goodguy/history.git]
/
cinelerra-5.1
/
plugins
/
C41
/
c41.C
diff --git
a/cinelerra-5.1/plugins/C41/c41.C
b/cinelerra-5.1/plugins/C41/c41.C
index ee59aec5eacd8df62793555083ad0cf525c2e0a1..c2d59da47ef6a9a2b3ad221df24cf22b6cf85d9f 100644
(file)
--- a/
cinelerra-5.1/plugins/C41/c41.C
+++ b/
cinelerra-5.1/plugins/C41/c41.C
@@
-460,7
+460,8
@@
float C41Effect::myLog2(float i)
float x;
float y;
float LogBodge = 0.346607f;
float x;
float y;
float LogBodge = 0.346607f;
- x = *(int *)&i;
+ union { float f; int i; } v;
+ v.f = i; x = v.i;
x *= 1.0 / (1 << 23); // 1/pow(2,23);
x = x - 127;
x *= 1.0 / (1 << 23); // 1/pow(2,23);
x = x - 127;
@@
-478,7
+479,8
@@
float C41Effect::myPow2(float i)
x = i + 127 - y;
x *= (1 << 23);
x = i + 127 - y;
x *= (1 << 23);
- *(int*) &x = (int)x;
+ union { float f; int i; } v;
+ v.i = (int)x; x = v.f;
return x;
}
return x;
}