Bug 945419 - Update libopus to 1.1 final. r=cpearce
authorRalph Giles <giles@mozilla.com>
Wed, 04 Dec 2013 14:00:00 -0800
changeset 158936 bd4960d0fddb4b57b0e0075b534b179330b99044
parent 158935 82969423bfb6ca8a02c4223bc9f4563a76427107
child 158937 b3b9e8733a5d6264bd184f217fe92097f078ed77
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewerscpearce
bugs945419
milestone28.0a1
Bug 945419 - Update libopus to 1.1 final. r=cpearce The code change only affects the opus custom modes which we do not use, so this commit effectively just changes the version number.
media/libopus/README_MOZILLA
media/libopus/celt/celt_decoder.c
media/libopus/celt/celt_encoder.c
media/libopus/moz.build
--- a/media/libopus/README_MOZILLA
+++ b/media/libopus/README_MOZILLA
@@ -3,9 +3,9 @@ IETF Opus audio codec reference implemen
 The source in this directory was copied from an opus
 repository checkout by running the ./update.sh script.
 Any changes made to this version of the source should
 be reflected in that script, e.g. by applying patch
 files after the copy step.
 
 The upstream repository is https://git.xiph.org/opus.git
 
-The git tag/revision used was v1.1-rc2-2-g086ea7c.
+The git tag/revision used was v1.1.
--- a/media/libopus/celt/celt_decoder.c
+++ b/media/libopus/celt/celt_decoder.c
@@ -208,31 +208,31 @@ void deemphasis(celt_sig *in[], opus_val
       y = pcm+c;
 #ifdef CUSTOM_MODES
       if (coef[1] != 0)
       {
          opus_val16 coef1 = coef[1];
          opus_val16 coef3 = coef[3];
          for (j=0;j<N;j++)
          {
-            celt_sig tmp = x[j] + m;
+            celt_sig tmp = x[j] + m + VERY_SMALL;
             m = MULT16_32_Q15(coef0, tmp)
                           - MULT16_32_Q15(coef1, x[j]);
             tmp = SHL32(MULT16_32_Q15(coef3, tmp), 2);
             scratch[j] = tmp;
          }
          apply_downsampling=1;
       } else
 #endif
       if (downsample>1)
       {
          /* Shortcut for the standard (non-custom modes) case */
          for (j=0;j<N;j++)
          {
-            celt_sig tmp = x[j] + m;
+            celt_sig tmp = x[j] + m + VERY_SMALL;
             m = MULT16_32_Q15(coef0, tmp);
             scratch[j] = tmp;
          }
          apply_downsampling=1;
       } else {
          /* Shortcut for the standard (non-custom modes) case */
          for (j=0;j<N;j++)
          {
--- a/media/libopus/celt/celt_encoder.c
+++ b/media/libopus/celt/celt_encoder.c
@@ -503,17 +503,17 @@ void celt_preemphasis(const opus_val16 *
    m = *mem;
 #ifdef CUSTOM_MODES
    if (coef[1] != 0)
    {
       opus_val16 coef1 = coef[1];
       opus_val16 coef2 = coef[2];
       for (i=0;i<N;i++)
       {
-         opus_val16 x, tmp;
+         celt_sig x, tmp;
          x = inp[i];
          /* Apply pre-emphasis */
          tmp = MULT16_16(coef2, x);
          inp[i] = tmp + m;
          m = MULT16_32_Q15(coef1, inp[i]) - MULT16_32_Q15(coef0, tmp);
       }
    } else
 #endif
--- a/media/libopus/moz.build
+++ b/media/libopus/moz.build
@@ -11,17 +11,17 @@ EXPORTS.opus += [
     'include/opus_types.h',
 ]
 
 MSVC_ENABLE_PGO = True
 
 FINAL_LIBRARY = 'gkmedias'
 
 DEFINES['OPUS_BUILD'] = True
-DEFINES['OPUS_VERSION'] = '"v1.1-rc2-2-g086ea7c-mozilla"'
+DEFINES['OPUS_VERSION'] = '"v1.1-mozilla"'
 DEFINES['USE_ALLOCA'] = True
 
 if CONFIG['OS_ARCH'] in ('Linux', 'Darwin', 'DragonFly', 'FreeBSD',
                          'NetBSD', 'OpenBSD'):
     DEFINES['HAVE_LRINTF'] = True
 
 if CONFIG['OS_ARCH'] == 'WINNT':
     DEFINES['inline'] = '__inline'