Adds trim and dynalloc control to surround masking
diff --git a/src/opus_multistream_encoder.c b/src/opus_multistream_encoder.c
index 7cc3237..2e29869 100644
--- a/src/opus_multistream_encoder.c
+++ b/src/opus_multistream_encoder.c
@@ -263,6 +263,11 @@
 
       compute_band_energies(celt_mode, freq, bandE, 21, 1, 1<<LM);
       amp2Log2(celt_mode, 21, 21, bandE, bandLogE+21*c, 1);
+      /* Apply spreading function with -6 dB/band going up and -12 dB/band going down. */
+      for (i=1;i<21;i++)
+         bandLogE[21*c+i] = MAX16(bandLogE[21*c+i], bandLogE[21*c+i-1]-QCONST16(1.f, DB_SHIFT));
+      for (i=19;i>=0;i--)
+         bandLogE[21*c+i] = MAX16(bandLogE[21*c+i], bandLogE[21*c+i+1]-QCONST16(2.f, DB_SHIFT));
       if (pos[c]==1)
       {
          for (i=0;i<21;i++)