ref: 6a74b411ec7fc864a62b179c1e4727176446773b
parent: 1827db6a601e02729475c4618500f49f8b0cbefa
author: Jean-Marc Valin <jmvalin@jmvalin.ca>
date: Fri Jun 15 12:52:14 EDT 2018
Use ambisonics families 2 and 3 instead of 254 and 253
--- a/src/opus_multistream_encoder.c
+++ b/src/opus_multistream_encoder.c
@@ -415,7 +415,7 @@
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 @@
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 @@
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
--- a/src/opus_projection_encoder.c
+++ b/src/opus_projection_encoder.c
@@ -104,7 +104,7 @@
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 @@
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);