X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fplugins%2FC41%2Fc41.C;h=c2d59da47ef6a9a2b3ad221df24cf22b6cf85d9f;hb=e13e0a987ad66b8274fcbaddc71eac583ea80bea;hp=ee59aec5eacd8df62793555083ad0cf525c2e0a1;hpb=bc2cf75c1c7a338d0491f1341bb3fc10f86e2ecf;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/plugins/C41/c41.C b/cinelerra-5.1/plugins/C41/c41.C index ee59aec5..c2d59da4 100644 --- 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; - 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; @@ -478,7 +479,8 @@ float C41Effect::myPow2(float i) 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; }