Use ambisonics families 2 and 3 instead of 254 and 253
authorJean-Marc Valin <jmvalin@jmvalin.ca>
Fri, 15 Jun 2018 20:52:14 +0000 (16:52 -0400)
committerJean-Marc Valin <jmvalin@jmvalin.ca>
Thu, 26 Jul 2018 02:41:14 +0000 (22:41 -0400)
src/opus_multistream_encoder.c
src/opus_projection_encoder.c

index aa48a61..09a84b2 100644 (file)
@@ -415,7 +415,7 @@ opus_int32 opus_multistream_surround_encoder_get_size(int channels, int mapping_
       nb_streams=channels;
       nb_coupled_streams=0;
 #ifdef ENABLE_EXPERIMENTAL_AMBISONICS
-   } else if (mapping_family==254)
+   } else if (mapping_family==2)
    {
       if (!validate_ambisonics(channels, &nb_streams, &nb_coupled_streams))
          return 0;
@@ -563,7 +563,7 @@ int opus_multistream_surround_encoder_init(
       for(i=0;i<channels;i++)
          mapping[i] = i;
 #ifdef ENABLE_EXPERIMENTAL_AMBISONICS
-   } else if (mapping_family==254)
+   } else if (mapping_family==2)
    {
       int i;
       if (!validate_ambisonics(channels, streams, coupled_streams))
@@ -579,7 +579,7 @@ int opus_multistream_surround_encoder_init(
    if (channels>2 && mapping_family==1) {
       mapping_type = MAPPING_TYPE_SURROUND;
 #ifdef ENABLE_EXPERIMENTAL_AMBISONICS
-   } else if (mapping_family==254)
+   } else if (mapping_family==2)
    {
       mapping_type = MAPPING_TYPE_AMBISONICS;
 #endif
index 8309e4b..5dfb4cf 100644 (file)
@@ -104,7 +104,7 @@ static int get_streams_from_channels(int channels, int mapping_family,
                                      int *streams, int *coupled_streams,
                                      int *order_plus_one)
 {
-  if (mapping_family == 253)
+  if (mapping_family == 3)
   {
     if (get_order_plus_one_from_channels(channels, order_plus_one) != OPUS_OK)
       return OPUS_BAD_ARG;
@@ -222,7 +222,7 @@ int opus_projection_ambisonics_encoder_init(OpusProjectionEncoder *st, opus_int3
     coupled_streams, &order_plus_one) != OPUS_OK)
     return OPUS_BAD_ARG;
 
-  if (mapping_family == 253)
+  if (mapping_family == 3)
   {
     /* Assign mixing matrix based on available pre-computed matrices. */
     mixing_matrix = get_mixing_matrix(st);