Bug 1372393 - opus: Fix unified build. r=kinetik draft
authorRalph Giles <giles@mozilla.com>
Tue, 13 Jun 2017 10:51:30 -0700
changeset 594881 2f7fc83cbe0184b38710dd5c2e74d9e7a494c31f
parent 594880 52f1b69cc24fccc13781686c636d37323af0a640
child 594882 ee971729b844a7826a531f8ef9ec59b00e3ab9a9
push id64188
push userbmo:giles@thaumas.net
push dateThu, 15 Jun 2017 17:37:30 +0000
reviewerskinetik
bugs1372393
milestone56.0a1
Bug 1372393 - opus: Fix unified build. r=kinetik Apply patch from upstream fixing duplicate symbol issue with the unified build. MozReview-Commit-ID: 54yOXWanTkm
media/libopus/rename.patch
media/libopus/silk/tables_NLSF_CB_WB.c
media/libopus/update.sh
new file mode 100644
--- /dev/null
+++ b/media/libopus/rename.patch
@@ -0,0 +1,22 @@
+diff --git a/silk/tables_NLSF_CB_WB.c b/silk/tables_NLSF_CB_WB.c
+index a15f7eb..5cc9f57 100644
+--- a/silk/tables_NLSF_CB_WB.c
++++ b/silk/tables_NLSF_CB_WB.c
+@@ -98,7 +98,7 @@ static const opus_uint8 silk_NLSF_CB1_WB_Q8[ 512 ] = {
+        110,    119,    129,    141,    175,    198,    218,    237
+ };
+ 
+-static const opus_int16 silk_NLSF_CB1_Wght_Q9[ 512 ] = {
++static const opus_int16 silk_NLSF_CB1_WB_Wght_Q9[ 512 ] = {
+      3657, 2925, 2925, 2925, 2925, 2925, 2925, 2925, 2925, 2925, 2925, 2925, 2963, 2963, 2925, 2846,
+      3216, 3085, 2972, 3056, 3056, 3010, 3010, 3010, 2963, 2963, 3010, 2972, 2888, 2846, 2846, 2726,
+      3920, 4014, 2981, 3207, 3207, 2934, 3056, 2846, 3122, 3244, 2925, 2846, 2620, 2553, 2780, 2925,
+@@ -223,7 +223,7 @@ const silk_NLSF_CB_struct silk_NLSF_CB_WB =
+     SILK_FIX_CONST( 0.15, 16 ),
+     SILK_FIX_CONST( 1.0 / 0.15, 6 ),
+     silk_NLSF_CB1_WB_Q8,
+-    silk_NLSF_CB1_Wght_Q9,
++    silk_NLSF_CB1_WB_Wght_Q9,
+     silk_NLSF_CB1_iCDF_WB,
+     silk_NLSF_PRED_WB_Q8,
+     silk_NLSF_CB2_SELECT_WB,
--- a/media/libopus/silk/tables_NLSF_CB_WB.c
+++ b/media/libopus/silk/tables_NLSF_CB_WB.c
@@ -93,17 +93,17 @@ static const opus_uint8 silk_NLSF_CB1_WB
         18,     31,     52,     68,     88,    103,    117,    126,
        138,    149,    163,    177,    192,    207,    223,    239,
         16,     29,     47,     61,     76,     90,    106,    119,
        133,    147,    161,    176,    193,    209,    224,    240,
         15,     21,     35,     50,     61,     73,     86,     97,
        110,    119,    129,    141,    175,    198,    218,    237
 };
 
-static const opus_int16 silk_NLSF_CB1_Wght_Q9[ 512 ] = {
+static const opus_int16 silk_NLSF_CB1_WB_Wght_Q9[ 512 ] = {
      3657, 2925, 2925, 2925, 2925, 2925, 2925, 2925, 2925, 2925, 2925, 2925, 2963, 2963, 2925, 2846,
      3216, 3085, 2972, 3056, 3056, 3010, 3010, 3010, 2963, 2963, 3010, 2972, 2888, 2846, 2846, 2726,
      3920, 4014, 2981, 3207, 3207, 2934, 3056, 2846, 3122, 3244, 2925, 2846, 2620, 2553, 2780, 2925,
      3516, 3197, 3010, 3103, 3019, 2888, 2925, 2925, 2925, 2925, 2888, 2888, 2888, 2888, 2888, 2753,
      5054, 5054, 2934, 3573, 3385, 3056, 3085, 2793, 3160, 3160, 2972, 2846, 2513, 2540, 2753, 2888,
      4428, 4149, 2700, 2753, 2972, 3010, 2925, 2846, 2981, 3019, 2925, 2925, 2925, 2925, 2888, 2726,
      3620, 3019, 2972, 3056, 3056, 2873, 2806, 3056, 3216, 3047, 2981, 3291, 3291, 2981, 3310, 2991,
      5227, 5014, 2540, 3338, 3526, 3385, 3197, 3094, 3376, 2981, 2700, 2647, 2687, 2793, 2846, 2673,
@@ -218,17 +218,17 @@ static const opus_int16 silk_NLSF_DELTA_
 
 const silk_NLSF_CB_struct silk_NLSF_CB_WB =
 {
     32,
     16,
     SILK_FIX_CONST( 0.15, 16 ),
     SILK_FIX_CONST( 1.0 / 0.15, 6 ),
     silk_NLSF_CB1_WB_Q8,
-    silk_NLSF_CB1_Wght_Q9,
+    silk_NLSF_CB1_WB_Wght_Q9,
     silk_NLSF_CB1_iCDF_WB,
     silk_NLSF_PRED_WB_Q8,
     silk_NLSF_CB2_SELECT_WB,
     silk_NLSF_CB2_iCDF_WB,
     silk_NLSF_CB2_BITS_WB_Q5,
     silk_NLSF_DELTA_MIN_WB_Q15,
 };
 
--- a/media/libopus/update.sh
+++ b/media/libopus/update.sh
@@ -70,8 +70,9 @@ sed -e "s/^The git tag\/revision used wa
 sed -e "s/DEFINES\['OPUS_VERSION'\][ \t]*=[ \t]*'\".*\"'/DEFINES['OPUS_VERSION'] = '\"${version}-mozilla\"'/" \
     ${TARGET}/moz.build > ${TARGET}/moz.build+ && \
     mv ${TARGET}/moz.build+ ${TARGET}/moz.build
 
 python gen-sources.py $1
 
 # apply outstanding local patches
 patch -p3 < nonunified.patch
+patch -p1 < rename.patch