shithub: opus

Download patch

ref: 5cbd7d5f7d981385fb948a161a7cd5a0146d9039
parent: eb55ebfc118fafd1f7bd7e91d7f2203c1e072860
author: Jean-Marc Valin <jmvalin@jmvalin.ca>
date: Mon Sep 10 09:49:38 EDT 2018

Avoiding get_demixing_matrix() symbol clash on unified build

--- a/src/opus_projection_decoder.c
+++ b/src/opus_projection_decoder.c
@@ -89,7 +89,7 @@
       src_stride, short_dst, dst_stride, frame_size);
 }
 
-static MappingMatrix *get_demixing_matrix(OpusProjectionDecoder *st)
+static MappingMatrix *get_dec_demixing_matrix(OpusProjectionDecoder *st)
 {
   /* void* cast avoids clang -Wcast-align warning */
   return (MappingMatrix*)(void*)((char*)st +
@@ -160,7 +160,7 @@
     return OPUS_BAD_ARG;
   }
 
-  mapping_matrix_init(get_demixing_matrix(st), channels, nb_input_streams, 0,
+  mapping_matrix_init(get_dec_demixing_matrix(st), channels, nb_input_streams, 0,
     buf, demixing_matrix_size);
 
   /* Set trivial mapping so each input channel pairs with a matrix column. */
@@ -216,7 +216,7 @@
 {
   return opus_multistream_decode_native(get_multistream_decoder(st), data, len,
     pcm, opus_projection_copy_channel_out_short, frame_size, decode_fec, 0,
-    get_demixing_matrix(st));
+    get_dec_demixing_matrix(st));
 }
 #else
 int opus_projection_decode(OpusProjectionDecoder *st, const unsigned char *data,
@@ -225,7 +225,7 @@
 {
   return opus_multistream_decode_native(get_multistream_decoder(st), data, len,
     pcm, opus_projection_copy_channel_out_short, frame_size, decode_fec, 1,
-    get_demixing_matrix(st));
+    get_dec_demixing_matrix(st));
 }
 #endif
 
@@ -235,7 +235,7 @@
 {
   return opus_multistream_decode_native(get_multistream_decoder(st), data, len,
     pcm, opus_projection_copy_channel_out_float, frame_size, decode_fec, 0,
-    get_demixing_matrix(st));
+    get_dec_demixing_matrix(st));
 }
 #endif
 
--- a/src/opus_projection_encoder.c
+++ b/src/opus_projection_encoder.c
@@ -122,7 +122,7 @@
     align(sizeof(OpusProjectionEncoder)));
 }
 
-static MappingMatrix *get_demixing_matrix(OpusProjectionEncoder *st)
+static MappingMatrix *get_enc_demixing_matrix(OpusProjectionEncoder *st)
 {
   /* void* cast avoids clang -Wcast-align warning */
   return (MappingMatrix *)(void*)((char*)st +
@@ -254,7 +254,7 @@
       return OPUS_BAD_ARG;
 
     /* Assign demixing matrix based on available pre-computed matrices. */
-    demixing_matrix = get_demixing_matrix(st);
+    demixing_matrix = get_enc_demixing_matrix(st);
     if (order_plus_one == 2)
     {
       mapping_matrix_init(demixing_matrix, mapping_matrix_foa_demixing.rows,
@@ -385,7 +385,7 @@
   int ret = OPUS_OK;
 
   ms_encoder = get_multistream_encoder(st);
-  demixing_matrix = get_demixing_matrix(st);
+  demixing_matrix = get_enc_demixing_matrix(st);
 
   va_start(ap, request);
   switch(request)