Enable RFC 8251 changes by default
authorJean-Marc Valin <jmvalin@jmvalin.ca>
Sun, 29 Oct 2017 04:58:23 +0000 (00:58 -0400)
committerJean-Marc Valin <jmvalin@jmvalin.ca>
Sun, 29 Oct 2017 05:01:35 +0000 (01:01 -0400)
celt/bands.c
celt/celt_decoder.c
configure.ac

index 3b1f5cf..950b727 100644 (file)
@@ -1507,7 +1507,7 @@ void quant_all_bands(int encode, const CELTMode *m, int start, int end,
          b = 0;
       }
 
          b = 0;
       }
 
-#ifdef ENABLE_UPDATE_DRAFT
+#ifndef DISABLE_UPDATE_DRAFT
       if (resynth && (M*eBands[i]-N >= M*eBands[start] || i==start+1) && (update_lowband || lowband_offset==0))
             lowband_offset = i;
       if (i == start+1)
       if (resynth && (M*eBands[i]-N >= M*eBands[start] || i==start+1) && (update_lowband || lowband_offset==0))
             lowband_offset = i;
       if (i == start+1)
@@ -1541,7 +1541,7 @@ void quant_all_bands(int encode, const CELTMode *m, int start, int end,
          fold_start = lowband_offset;
          while(M*eBands[--fold_start] > effective_lowband+norm_offset);
          fold_end = lowband_offset-1;
          fold_start = lowband_offset;
          while(M*eBands[--fold_start] > effective_lowband+norm_offset);
          fold_end = lowband_offset-1;
-#ifdef ENABLE_UPDATE_DRAFT
+#ifndef DISABLE_UPDATE_DRAFT
          while(++fold_end < i && M*eBands[fold_end] < effective_lowband+norm_offset+N);
 #else
          while(M*eBands[++fold_end] < effective_lowband+norm_offset+N);
          while(++fold_end < i && M*eBands[fold_end] < effective_lowband+norm_offset+N);
 #else
          while(M*eBands[++fold_end] < effective_lowband+norm_offset+N);
index 10958a5..944b5e1 100644 (file)
@@ -164,7 +164,7 @@ OPUS_CUSTOM_NOSTATIC int opus_custom_decoder_init(CELTDecoder *st, const CELTMod
    st->start = 0;
    st->end = st->mode->effEBands;
    st->signalling = 1;
    st->start = 0;
    st->end = st->mode->effEBands;
    st->signalling = 1;
-#ifdef ENABLE_UPDATE_DRAFT
+#ifndef DISABLE_UPDATE_DRAFT
    st->disable_inv = channels == 1;
 #else
    st->disable_inv = 0;
    st->disable_inv = channels == 1;
 #else
    st->disable_inv = 0;
index 299181c..fc80275 100644 (file)
@@ -804,12 +804,12 @@ AC_ARG_ENABLE([extra-programs],
 AM_CONDITIONAL([EXTRA_PROGRAMS], [test "$enable_extra_programs" = "yes"])
 
 
 AM_CONDITIONAL([EXTRA_PROGRAMS], [test "$enable_extra_programs" = "yes"])
 
 
-AC_ARG_ENABLE([update-draft],
-  AS_HELP_STRING([--enable-update-draft], [Enable bitstream changes from draft-ietf-codec-opus-update]),,
-  [enable_update_draft=no])
+AC_ARG_ENABLE([rfc8251],
+             AS_HELP_STRING([--disable-rfc8251], [Disable bitstream fixes from RFC 8251]),,
+  [enable_rfc8251=yes])
 
 
-AS_IF([test "$enable_update_draft" = "yes"], [
-  AC_DEFINE([ENABLE_UPDATE_DRAFT], [1], [Enable bitstream changes from draft-ietf-codec-opus-update])
+AS_IF([test "$enable_rfc8251" = "no"], [
+       AC_DEFINE([DISABLE_UPDATE_DRAFT], [1], [Disable bitstream fixes from RFC 8251])
 ])
 
 
 ])