Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Allen <bitllama@google.com>2018-03-20 00:55:24 +0300
committerJean-Marc Valin <jmvalin@jmvalin.ca>2018-03-21 20:59:30 +0300
commit9b092dd388a98f8ceb8ec703fe2b757e88e96ec0 (patch)
tree9450b8c19a05df1ca6286c9fc56c592a34c52e3c /src
parenta4b5282f94deea91e4e5271d7ff7f72a8d1f9b6b (diff)
Support for Ambisonics.
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
Diffstat (limited to 'src')
-rw-r--r--src/opus_projection_decoder.c101
-rw-r--r--src/opus_projection_encoder.c89
2 files changed, 190 insertions, 0 deletions
diff --git a/src/opus_projection_decoder.c b/src/opus_projection_decoder.c
index d39cb834..c879ead7 100644
--- a/src/opus_projection_decoder.c
+++ b/src/opus_projection_decoder.c
@@ -254,4 +254,105 @@ void opus_projection_decoder_destroy(OpusProjectionDecoder *st)
opus_free(st);
}
+#else /* ENABLE_EXPERIMENTAL_AMBISONICS */
+
+opus_int32 opus_projection_decoder_get_size(
+ int channels,
+ int streams,
+ int coupled_streams)
+{
+ (void)channels;
+ (void)streams;
+ (void)coupled_streams;
+ return OPUS_UNIMPLEMENTED;
+}
+
+OpusProjectionDecoder *opus_projection_decoder_create(
+ opus_int32 Fs,
+ int channels,
+ int streams,
+ int coupled_streams,
+ unsigned char *demixing_matrix,
+ opus_int32 demixing_matrix_size,
+ int *error)
+{
+ (void)Fs;
+ (void)channels;
+ (void)streams;
+ (void)coupled_streams;
+ (void)demixing_matrix;
+ (void)demixing_matrix_size;
+ if (error) *error = OPUS_UNIMPLEMENTED;
+ return NULL;
+}
+
+int opus_projection_decoder_init(
+ OpusProjectionDecoder *st,
+ opus_int32 Fs,
+ int channels,
+ int streams,
+ int coupled_streams,
+ unsigned char *demixing_matrix,
+ opus_int32 demixing_matrix_size)
+{
+ (void)st;
+ (void)Fs;
+ (void)channels;
+ (void)streams;
+ (void)coupled_streams;
+ (void)demixing_matrix;
+ (void)demixing_matrix_size;
+ return OPUS_UNIMPLEMENTED;
+}
+
+int opus_projection_decode(
+ OpusProjectionDecoder *st,
+ const unsigned char *data,
+ opus_int32 len,
+ opus_int16 *pcm,
+ int frame_size,
+ int decode_fec)
+{
+ (void)st;
+ (void)data;
+ (void)len;
+ (void)pcm;
+ (void)frame_size;
+ (void)decode_fec;
+ return OPUS_UNIMPLEMENTED;
+}
+
+int opus_projection_decode_float(
+ OpusProjectionDecoder *st,
+ const unsigned char *data,
+ opus_int32 len,
+ float *pcm,
+ int frame_size,
+ int decode_fec)
+{
+ (void)st;
+ (void)data;
+ (void)len;
+ (void)pcm;
+ (void)frame_size;
+ (void)decode_fec;
+ return OPUS_UNIMPLEMENTED;
+}
+
+int opus_projection_decoder_ctl(
+ OpusProjectionDecoder *st,
+ int request,
+ ...)
+{
+ (void)st;
+ (void)request;
+ return OPUS_UNIMPLEMENTED;
+}
+
+void opus_projection_decoder_destroy(
+ OpusProjectionDecoder *st)
+{
+ (void)st;
+}
+
#endif /* ENABLE_EXPERIMENTAL_AMBISONICS */
diff --git a/src/opus_projection_encoder.c b/src/opus_projection_encoder.c
index ea2a26ba..1c403c31 100644
--- a/src/opus_projection_encoder.c
+++ b/src/opus_projection_encoder.c
@@ -459,4 +459,93 @@ bad_arg:
return OPUS_BAD_ARG;
}
+#else /* ENABLE_EXPERIMENTAL_AMBISONICS */
+
+opus_int32 opus_projection_ambisonics_encoder_get_size(
+ int channels, int mapping_family)
+{
+ (void)channels;
+ (void)mapping_family;
+ return OPUS_UNIMPLEMENTED;
+}
+
+OpusProjectionEncoder *opus_projection_ambisonics_encoder_create(
+ opus_int32 Fs, int channels, int mapping_family, int *streams,
+ int *coupled_streams, int application, int *error)
+{
+ (void)Fs;
+ (void)channels;
+ (void)mapping_family;
+ (void)streams;
+ (void)coupled_streams;
+ (void)application;
+ if (error) *error = OPUS_UNIMPLEMENTED;
+ return NULL;
+}
+
+int opus_projection_ambisonics_encoder_init(
+ OpusProjectionEncoder *st,
+ opus_int32 Fs,
+ int channels,
+ int mapping_family,
+ int *streams,
+ int *coupled_streams,
+ int application)
+{
+ (void)st;
+ (void)Fs;
+ (void)channels;
+ (void)mapping_family;
+ (void)streams;
+ (void)coupled_streams;
+ (void)application;
+ return OPUS_UNIMPLEMENTED;
+}
+
+int opus_projection_encode(
+ OpusProjectionEncoder *st,
+ const opus_int16 *pcm,
+ int frame_size,
+ unsigned char *data,
+ opus_int32 max_data_bytes)
+{
+ (void)st;
+ (void)pcm;
+ (void)frame_size;
+ (void)data;
+ (void)max_data_bytes;
+ return OPUS_UNIMPLEMENTED;
+}
+
+int opus_projection_encode_float(
+ OpusProjectionEncoder *st,
+ const float *pcm,
+ int frame_size,
+ unsigned char *data,
+ opus_int32 max_data_bytes)
+{
+ (void)st;
+ (void)pcm;
+ (void)frame_size;
+ (void)data;
+ (void)max_data_bytes;
+ return OPUS_UNIMPLEMENTED;
+}
+
+void opus_projection_encoder_destroy(
+ OpusProjectionEncoder *st)
+{
+ (void)st;
+}
+
+int opus_projection_encoder_ctl(
+ OpusProjectionEncoder *st,
+ int request,
+ ...)
+{
+ (void)st;
+ (void)request;
+ return OPUS_UNIMPLEMENTED;
+}
+
#endif /* ENABLE_EXPERIMENTAL_AMBISONICS */