summaryrefslogtreecommitdiff
path: root/libavcodec/aaccoder.c
diff options
context:
space:
mode:
authorRostislav Pehlivanov <atomnuker@gmail.com>2015-07-29 05:44:24 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2015-08-01 02:54:35 +0200
commit6d175158e914f042d4dc3a67688456cd0b9d8c62 (patch)
tree4c5bd1f5e874ff4df18b356a2a48a3e6e092b880 /libavcodec/aaccoder.c
parent2ef6994ef6354425e0b1c229b05a0b2ffe0928e9 (diff)
aacenc: remove redundant argument from coder functions
This commit removes a redundant argument from the functions in aaccoder. The argument lambda was redundant as it was just a copy of s->lambda, to which all functions have access to anyway. This cleans up the function pointers a bit which is helpful as there are a lot of other search_for_* functions under development and with them populated it gets messy. Reviewed-by: Claudio Freire <klaussfreire@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/aaccoder.c')
-rw-r--r--libavcodec/aaccoder.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/aaccoder.c b/libavcodec/aaccoder.c
index eb583426ed..04419716cd 100644
--- a/libavcodec/aaccoder.c
+++ b/libavcodec/aaccoder.c
@@ -1177,10 +1177,10 @@ static void search_for_quantizers_fast(AVCodecContext *avctx, AACEncContext *s,
sce->sf_idx[(w+w2)*16+g] = sce->sf_idx[w*16+g];
}
-static void search_for_pns(AACEncContext *s, AVCodecContext *avctx, SingleChannelElement *sce,
- const float lambda)
+static void search_for_pns(AACEncContext *s, AVCodecContext *avctx, SingleChannelElement *sce)
{
int start = 0, w, w2, g;
+ const float lambda = s->lambda;
const float freq_mult = avctx->sample_rate/(1024.0f/sce->ics.num_windows)/2.0f;
const float spread_threshold = NOISE_SPREAD_THRESHOLD*(lambda/120.f);
const float thr_mult = NOISE_LAMBDA_NUMERATOR/lambda;
@@ -1214,8 +1214,7 @@ static void search_for_pns(AACEncContext *s, AVCodecContext *avctx, SingleChanne
}
}
-static void search_for_is(AACEncContext *s, AVCodecContext *avctx, ChannelElement *cpe,
- const float lambda)
+static void search_for_is(AACEncContext *s, AVCodecContext *avctx, ChannelElement *cpe)
{
float IS[128];
float *L34 = s->scoefs + 128*0, *R34 = s->scoefs + 128*1;
@@ -1224,6 +1223,7 @@ static void search_for_is(AACEncContext *s, AVCodecContext *avctx, ChannelElemen
SingleChannelElement *sce1 = &cpe->ch[1];
int start = 0, count = 0, i, w, w2, g;
const float freq_mult = avctx->sample_rate/(1024.0f/sce0->ics.num_windows)/2.0f;
+ const float lambda = s->lambda;
for (w = 0; w < 128; w++)
if (sce1->band_type[w] >= INTENSITY_BT2)
@@ -1312,12 +1312,12 @@ static void search_for_is(AACEncContext *s, AVCodecContext *avctx, ChannelElemen
cpe->is_mode = !!count;
}
-static void search_for_ms(AACEncContext *s, ChannelElement *cpe,
- const float lambda)
+static void search_for_ms(AACEncContext *s, ChannelElement *cpe)
{
int start = 0, i, w, w2, g;
float M[128], S[128];
float *L34 = s->scoefs, *R34 = s->scoefs + 128, *M34 = s->scoefs + 128*2, *S34 = s->scoefs + 128*3;
+ const float lambda = s->lambda;
SingleChannelElement *sce0 = &cpe->ch[0];
SingleChannelElement *sce1 = &cpe->ch[1];
if (!cpe->common_window)