summaryrefslogtreecommitdiffstats
path: root/openwrt/package/libvorbis/patches/libvorbis-1.1.1-gcc4-1.patch
diff options
context:
space:
mode:
authorkaloz <kaloz@3c298f89-4303-0410-b956-a3cf2f4a3e73>2006-01-29 20:02:22 +0000
committerkaloz <kaloz@3c298f89-4303-0410-b956-a3cf2f4a3e73>2006-01-29 20:02:22 +0000
commit2b496734c27b9077fd9c05d748dcd39d466f9ba5 (patch)
treeda2dc5a439658cb039fff0616721e526337e09d0 /openwrt/package/libvorbis/patches/libvorbis-1.1.1-gcc4-1.patch
parent33178834e8b04a2d5c66c78791fd1cb1c9064152 (diff)
add gcc4 fixes, remove the NEC FC20X2JA driver patch from lcd4linux temporary
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@3066 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'openwrt/package/libvorbis/patches/libvorbis-1.1.1-gcc4-1.patch')
-rw-r--r--openwrt/package/libvorbis/patches/libvorbis-1.1.1-gcc4-1.patch60
1 files changed, 60 insertions, 0 deletions
diff --git a/openwrt/package/libvorbis/patches/libvorbis-1.1.1-gcc4-1.patch b/openwrt/package/libvorbis/patches/libvorbis-1.1.1-gcc4-1.patch
new file mode 100644
index 000000000..480172fcf
--- /dev/null
+++ b/openwrt/package/libvorbis/patches/libvorbis-1.1.1-gcc4-1.patch
@@ -0,0 +1,60 @@
+Submitted By: Steffen Knollmann <sknolli at astro.physik.uni-goettingen.de>
+Date: 2005-11-09
+Initial Package Version: 1.1.1
+Upstream Status: From Upstream
+Origin: msmith, courtesy of upstream SVN
+Description: Fixes an optimization problem with gcc-4.0.x that results in
+ dysfunctional library that will produce bigger encoded files
+ with a poor audio quality. Detailed description at:
+ http://trac.xiph.org/cgi-bin/trac.cgi/ticket/583
+
+$LastChangedBy: randy $
+$Date: 2005-11-18 08:12:42 -0700 (Fri, 18 Nov 2005) $
+
+
+--- libvorbis-1.1.1/lib/scales.h (revision 9958)
++++ libvorbis-1.1.1/lib/scales.h (revision 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);
+-}
+-
+-static float FABS(float *x){
+- ogg_uint32_t *ix=(ogg_uint32_t *)x;
+- *ix&=0x7fffffffUL;
+- return(*x);
++ union {
++ ogg_uint32_t i;
++ float f;
++ } ix;
++ ix.f = x;
++ ix.i = (ix.i & 0x80000000U) | (0x3f800000U);
++ return ix.f;
+ }
+
+ /* 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)
+