From 2dc27dfa13eb4f2b9cd291852b4e9c9508cd9cb2 Mon Sep 17 00:00:00 2001
From: Jean-Marc Valin <jmvalin@jmvalin.ca>
Date: Wed, 13 Nov 2013 19:35:43 -0500
Subject: [PATCH] Rename preemphasis() to celt_preemphasis() to avoid amrnb
 symbol clash

http://lists.xiph.org/pipermail/opus/2013-November/002372.html
---
 celt/celt.h                    | 2 +-
 celt/celt_encoder.c            | 4 ++--
 src/opus_multistream_encoder.c | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/celt/celt.h b/celt/celt.h
index ad1c1d847..1d41f5fc9 100644
--- a/celt/celt.h
+++ b/celt/celt.h
@@ -194,7 +194,7 @@ extern const signed char tf_select_table[4][8];
 
 int resampling_factor(opus_int32 rate);
 
-void preemphasis(const opus_val16 * OPUS_RESTRICT pcmp, celt_sig * OPUS_RESTRICT inp,
+void celt_preemphasis(const opus_val16 * OPUS_RESTRICT pcmp, celt_sig * OPUS_RESTRICT inp,
                         int N, int CC, int upsample, const opus_val16 *coef, celt_sig *mem, int clip);
 
 void comb_filter(opus_val32 *y, opus_val32 *x, int T0, int T1, int N,
diff --git a/celt/celt_encoder.c b/celt/celt_encoder.c
index 784d43297..ba78ea979 100644
--- a/celt/celt_encoder.c
+++ b/celt/celt_encoder.c
@@ -450,7 +450,7 @@ static void compute_mdcts(const CELTMode *mode, int shortBlocks, celt_sig * OPUS
 }
 
 
-void preemphasis(const opus_val16 * OPUS_RESTRICT pcmp, celt_sig * OPUS_RESTRICT inp,
+void celt_preemphasis(const opus_val16 * OPUS_RESTRICT pcmp, celt_sig * OPUS_RESTRICT inp,
                         int N, int CC, int upsample, const opus_val16 *coef, celt_sig *mem, int clip)
 {
    int i;
@@ -1452,7 +1452,7 @@ int celt_encode_with_ec(CELTEncoder * OPUS_RESTRICT st, const opus_val16 * pcm,
       enc->nbits_total+=tell-ec_tell(enc);
    }
    c=0; do {
-      preemphasis(pcm+c, in+c*(N+st->overlap)+st->overlap, N, CC, st->upsample,
+      celt_preemphasis(pcm+c, in+c*(N+st->overlap)+st->overlap, N, CC, st->upsample,
                   mode->preemph, st->preemph_memE+c, st->clip);
    } while (++c<CC);
 
diff --git a/src/opus_multistream_encoder.c b/src/opus_multistream_encoder.c
index 54a0d10ec..4430e6947 100644
--- a/src/opus_multistream_encoder.c
+++ b/src/opus_multistream_encoder.c
@@ -256,7 +256,7 @@ void surround_analysis(const CELTMode *celt_mode, const void *pcm, opus_val16 *b
    {
       OPUS_COPY(in, mem+c*overlap, overlap);
       (*copy_channel_in)(x, 1, pcm, channels, c, len);
-      preemphasis(x, in+overlap, frame_size, 1, upsample, celt_mode->preemph, preemph_mem+c, 0);
+      celt_preemphasis(x, in+overlap, frame_size, 1, upsample, celt_mode->preemph, preemph_mem+c, 0);
       clt_mdct_forward(&celt_mode->mdct, in, freq, celt_mode->window, overlap, celt_mode->maxLM-LM, 1);
       if (upsample != 1)
       {
-- 
GitLab