Bug 683823 - Update libvorbis to upstream r18077. r=kinetik
authorRalph Giles <giles@mozilla.com>
Tue, 27 Sep 2011 19:59:34 +0100
changeset 77721 d30c779054c917d10cd3b4d918dbbae61418e4a4
parent 77720 c81e6b2dc155384b7a110e01cc54c3446e92ab3a
child 77722 df54cc03245780d449f0707f1e97250fe81c4399
push id3
push userfelipc@gmail.com
push dateFri, 30 Sep 2011 20:09:13 +0000
reviewerskinetik
bugs683823
milestone10.0a1
Bug 683823 - Update libvorbis to upstream r18077. r=kinetik This removes warning fixes which have been merged upstream since the 1.3.2 release. The only other upstream changes have been to documentation, which we don't include in our repository. I also corrected the usage comment at the top of update.sh.
media/libvorbis/README_MOZILLA
media/libvorbis/bug666672_gccWarnings.diff
media/libvorbis/lib/vorbis_codebook.c
media/libvorbis/lib/vorbis_floor1.c
media/libvorbis/lib/vorbis_psy.c
media/libvorbis/update.sh
--- a/media/libvorbis/README_MOZILLA
+++ b/media/libvorbis/README_MOZILLA
@@ -1,12 +1,11 @@
 The source from this directory was copied from the libvorbis
 subversion repository using the update.sh script. The only changes
 made were those applied by update.sh and the addition/upate of
 Makefile.in files for the Mozilla build system.
 
-The upstream release used was libvorbis 1.3.2 (SVN r17614).
+The upstream version used was libvorbis svn r18077.
 
 Some files are renamed during the copy to prevent clashes with object
 file names with other Mozilla libraries.
 
 alloca.diff - Bug 469639 - Failed to build firefox trunk on OpenSolaris
-bug666672_gccWarnings.diff - Bug 666672 - Fixing some gcc compiler warnings
deleted file mode 100644
--- a/media/libvorbis/bug666672_gccWarnings.diff
+++ /dev/null
@@ -1,91 +0,0 @@
-diff --git a/media/libvorbis/lib/vorbis_codebook.c b/media/libvorbis/lib/vorbis_codebook.c
---- a/media/libvorbis/lib/vorbis_codebook.c
-+++ b/media/libvorbis/lib/vorbis_codebook.c
-@@ -243,17 +243,17 @@ static_codebook *vorbis_staticbook_unpac
-         quantvals=(s->dim==0?0:_book_maptype1_quantvals(s));
-         break;
-       case 2:
-         quantvals=s->entries*s->dim;
-         break;
-       }
- 
-       /* quantized values */
--      if((quantvals*s->q_quant+7>>3)>opb->storage-oggpack_bytes(opb))
-+      if(((quantvals*s->q_quant+7)>>3)>opb->storage-oggpack_bytes(opb))
-         goto _eofout;
-       s->quantlist=_ogg_malloc(sizeof(*s->quantlist)*quantvals);
-       for(i=0;i<quantvals;i++)
-         s->quantlist[i]=oggpack_read(opb,s->q_quant);
- 
-       if(quantvals&&s->quantlist[quantvals-1]==-1)goto _eofout;
-     }
-     break;
-diff --git a/media/libvorbis/lib/vorbis_floor1.c b/media/libvorbis/lib/vorbis_floor1.c
---- a/media/libvorbis/lib/vorbis_floor1.c
-+++ b/media/libvorbis/lib/vorbis_floor1.c
-@@ -1030,17 +1030,17 @@ static void *floor1_inverse1(vorbis_bloc
-         }else{
-           if(val&1){
-             val= -((val+1)>>1);
-           }else{
-             val>>=1;
-           }
-         }
- 
--        fit_value[i]=val+predicted&0x7fff;
-+        fit_value[i]=(val+predicted)&0x7fff;
-         fit_value[look->loneighbor[i-2]]&=0x7fff;
-         fit_value[look->hineighbor[i-2]]&=0x7fff;
- 
-       }else{
-         fit_value[i]=predicted|0x8000;
-       }
- 
-     }
-diff --git a/media/libvorbis/lib/vorbis_psy.c b/media/libvorbis/lib/vorbis_psy.c
---- a/media/libvorbis/lib/vorbis_psy.c
-+++ b/media/libvorbis/lib/vorbis_psy.c
-@@ -1149,37 +1149,38 @@ void _vp_couple_quantize_normalize(int b
- 
-             }else{
-               /* lossy (point) coupling */
-               if(j<limit-i){
-                 /* dipole */
-                 reM[j] += reA[j];
-                 qeM[j] = fabs(reM[j]);
-               }else{
-+#if 0
-                 /* AoTuV */
-                 /** @ M2 **
-                     The boost problem by the combination of noise normalization and point stereo is eased.
-                     However, this is a temporary patch.
-                     by Aoyumi @ 2004/04/18
-                 */
--                /*float derate = (1.0 - de*((float)(j-limit+i) / (float)(n-limit)));
--                /* elliptical 
-+                float derate = (1.0 - de*((float)(j-limit+i) / (float)(n-limit)));
-+                /* elliptical */
-                 if(reM[j]+reA[j]<0){
-                   reM[j] = - (qeM[j] = (fabs(reM[j])+fabs(reA[j]))*derate*derate);
-                 }else{
-                   reM[j] =   (qeM[j] = (fabs(reM[j])+fabs(reA[j]))*derate*derate);
--                  }*/
--
-+                }
-+#else
-                 /* elliptical */
-                 if(reM[j]+reA[j]<0){
-                   reM[j] = - (qeM[j] = fabs(reM[j])+fabs(reA[j]));
-                 }else{
-                   reM[j] =   (qeM[j] = fabs(reM[j])+fabs(reA[j]));
-                 }
--
-+#endif
- 
-               }
-               reA[j]=qeA[j]=0.f;
-               fA[j]=1;
-               iA[j]=0;
-             }
-           }
-           floorM[j]=floorA[j]=floorM[j]+floorA[j];
--- a/media/libvorbis/lib/vorbis_codebook.c
+++ b/media/libvorbis/lib/vorbis_codebook.c
@@ -6,17 +6,17 @@
  * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
  *                                                                  *
  * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009             *
  * by the Xiph.Org Foundation http://www.xiph.org/                  *
  *                                                                  *
  ********************************************************************
 
  function: basic codebook pack/unpack/code/decode operations
- last mod: $Id: codebook.c 17553 2010-10-21 17:54:26Z tterribe $
+ last mod: $Id: codebook.c 18076 2011-09-02 02:44:49Z giles $
 
  ********************************************************************/
 
 #include <stdlib.h>
 #include <string.h>
 #include <math.h>
 #include <ogg/ogg.h>
 #include "vorbis/codec.h"
--- a/media/libvorbis/lib/vorbis_floor1.c
+++ b/media/libvorbis/lib/vorbis_floor1.c
@@ -6,17 +6,17 @@
  * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
  *                                                                  *
  * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009             *
  * by the Xiph.Org Foundation http://www.xiph.org/                  *
  *                                                                  *
  ********************************************************************
 
  function: floor backend 1 implementation
- last mod: $Id: floor1.c 17555 2010-10-21 18:14:51Z tterribe $
+ last mod: $Id: floor1.c 17688 2010-11-29 23:53:30Z tterribe $
 
  ********************************************************************/
 
 #include <stdlib.h>
 #include <string.h>
 #include <math.h>
 #include <ogg/ogg.h>
 #include "vorbis/codec.h"
--- a/media/libvorbis/lib/vorbis_psy.c
+++ b/media/libvorbis/lib/vorbis_psy.c
@@ -6,17 +6,17 @@
  * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
  *                                                                  *
  * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2010             *
  * by the Xiph.Org Foundation http://www.xiph.org/                  *
  *                                                                  *
  ********************************************************************
 
  function: psychoacoustics not including preecho
- last mod: $Id: psy.c 17569 2010-10-26 17:09:47Z xiphmont $
+ last mod: $Id: psy.c 18077 2011-09-02 02:49:00Z giles $
 
  ********************************************************************/
 
 #include <stdlib.h>
 #include <math.h>
 #include <string.h>
 #include "vorbis/codec.h"
 #include "codec_internal.h"
@@ -1015,17 +1015,19 @@ void _vp_couple_quantize_normalize(int b
                                    int     ch){
 
   int i;
   int n = p->n;
   int partition=(p->vi->normal_p ? p->vi->normal_partition : 16);
   int limit = g->coupling_pointlimit[p->vi->blockflag][blobno];
   float prepoint=stereo_threshholds[g->coupling_prepointamp[blobno]];
   float postpoint=stereo_threshholds[g->coupling_postpointamp[blobno]];
+#if 0
   float de=0.1*p->m_val; /* a blend of the AoTuV M2 and M3 code here and below */
+#endif
 
   /* mdct is our raw mdct output, floor not removed. */
   /* inout passes in the ifloor, passes back quantized result */
 
   /* unquantized energy (negative indicates amplitude has negative sign) */
   float **raw = alloca(ch*sizeof(*raw));
 
   /* dual pupose; quantized energy (if flag set), othersize fabs(raw) */
--- a/media/libvorbis/update.sh
+++ b/media/libvorbis/update.sh
@@ -1,9 +1,9 @@
-# Usage: cp $1/update.sh <vorbis_src_directory>
+# Usage: /bin/sh update.sh <vorbis_src_directory>
 #
 # Copies the needed files from a directory containing the original
 # libvorbis source that we need for the Mozilla HTML5 media support.
 cp $1/lib/envelope.h ./lib/envelope.h
 cp $1/lib/lpc.h ./lib/lpc.h
 cp $1/lib/highlevel.h ./lib/highlevel.h
 cp $1/lib/floor0.c ./lib/vorbis_floor0.c
 cp $1/lib/lookup_data.h ./lib/lookup_data.h
@@ -42,9 +42,8 @@ cp $1/lib/codebook.c ./lib/vorbis_codebo
 cp $1/lib/bitrate.c ./lib/vorbis_bitrate.c
 cp $1/lib/block.c ./lib/vorbis_block.c
 cp $1/include/vorbis/codec.h ./include/vorbis/codec.h
 cp $1/todo.txt ./todo.txt
 cp $1/COPYING ./COPYING
 cp $1/README ./README
 cp $1/AUTHORS ./AUTHORS
 patch -p3 < ./alloca.diff
-patch -p3 < ./bug666672_gccWarnings.diff