Bugzilla – Attachment 48777 Details for
Bug 115135
libvorbis is miscompiled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
IDP Log In
|
Forgot Password
[patch]
Patch committed to libvorbis SVN to fix this issue
vorbis-aliasing.patch (text/plain), 1.21 KB, created by
Michael Smith
on 2005-09-05 11:09:39 UTC
(
hide
)
Description:
Patch committed to libvorbis SVN to fix this issue
Filename:
MIME Type:
Creator:
Michael Smith
Created:
2005-09-05 11:09:39 UTC
Size:
1.21 KB
patch
obsolete
>Modified: trunk/vorbis/lib/scales.h >=================================================================== >--- trunk/vorbis/lib/scales.h 2005-09-05 01:07:26 UTC (rev 9958) >+++ trunk/vorbis/lib/scales.h 2005-09-05 11:04:48 UTC (rev 9959) >@@ -26,20 +26,24 @@ > #ifdef VORBIS_IEEE_FLOAT32 > > static float unitnorm(float x){ >- ogg_uint32_t *ix=(ogg_uint32_t *)&x; >- *ix=(*ix&0x80000000UL)|(0x3f800000UL); >- return(x); >+ union { >+ ogg_uint32_t i; >+ float f; >+ } ix; >+ ix.f = x; >+ ix.i = (ix.i & 0x80000000U) | (0x3f800000U); >+ return ix.f; > } > >-static float FABS(float *x){ >- ogg_uint32_t *ix=(ogg_uint32_t *)x; >- *ix&=0x7fffffffUL; >- return(*x); >-} >- > /* Segher was off (too high) by ~ .3 decibel. Center the conversion correctly. */ > static float todB(const float *x){ >- return (float)((*(ogg_int32_t *)x)&0x7fffffff) * 7.17711438e-7f -764.6161886f; >+ union { >+ ogg_uint32_t i; >+ float f; >+ } ix; >+ ix.f = *x; >+ ix.i = ix.i&0x7fffffff; >+ return (float)(ix.i * 7.17711438e-7f -764.6161886f); > } > > #define todB_nn(x) todB(x) >@@ -51,8 +55,6 @@ > return(1.f); > } > >-#define FABS(x) fabs(*(x)) >- > #define todB(x) (*(x)==0?-400.f:log(*(x)**(x))*4.34294480f) > #define todB_nn(x) (*(x)==0.f?-400.f:log(*(x))*8.6858896f) >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 115135
:
48763
| 48777