From e368e62092f7c7f511585757af9e16a374a1e048 Mon Sep 17 00:00:00 2001 From: Jean-Marc Valin Date: Thu, 3 Jan 2013 14:28:28 -0500 Subject: [PATCH] Remove condition in pre/de-emphasis when not building with custom modes Should slightly improve coverage and reduce code size --- celt/celt_decoder.c | 32 ++++++++++++++++++-------------- celt/celt_encoder.c | 28 ++++++++++++++++------------ 2 files changed, 34 insertions(+), 26 deletions(-) diff --git a/celt/celt_decoder.c b/celt/celt_decoder.c index bfcdf415..f2a2fd80 100644 --- a/celt/celt_decoder.c +++ b/celt/celt_decoder.c @@ -191,10 +191,9 @@ void deemphasis(celt_sig *in[], opus_val16 *pcm, int N, int C, int downsample, c { int c; int Nd; - opus_val16 coef0, coef1; + opus_val16 coef0; coef0 = coef[0]; - coef1 = coef[1]; Nd = N/downsample; c=0; do { int j; @@ -203,26 +202,31 @@ void deemphasis(celt_sig *in[], opus_val16 *pcm, int N, int C, int downsample, c celt_sig m = mem[c]; x =in[c]; y = pcm+c; - /* Shortcut for the standard (non-custom modes) case */ - if (coef1 == 0) +#ifdef CUSTOM_MODES + if (coef[1] != 0) { + opus_val16 coef1 = coef[1]; + opus_val16 coef3 = coef[3]; + for (j=0;j