diff options
author | Rostislav Pehlivanov <atomnuker@gmail.com> | 2015-08-21 20:53:14 +0300 |
---|---|---|
committer | Rostislav Pehlivanov <atomnuker@gmail.com> | 2015-08-21 20:53:14 +0300 |
commit | 43b378a0d321e3d01f196cec95e13acfac80d464 (patch) | |
tree | 30d4afe233ffb915510b34c32eb8e7c7e17871cb /libavcodec/aacenc.c | |
parent | b47a1e5c5f585da714b0361a3077b9ded46c8c54 (diff) |
aaccoder: move the quantization functions to a separate file
This commit moves the quantizer to a separate header file.
This allows the quantizer to be used from a separate files outside
of aaccoder without having to put another function pointer and will
result in a slight speedup as the compiler can do more optimizations.
This is required for commits following.
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Diffstat (limited to 'libavcodec/aacenc.c')
-rw-r--r-- | libavcodec/aacenc.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c index e5730d4078..924064823f 100644 --- a/libavcodec/aacenc.c +++ b/libavcodec/aacenc.c @@ -355,11 +355,14 @@ static void encode_spectral_coeffs(AACEncContext *s, SingleChannelElement *sce) continue; } for (w2 = w; w2 < w + sce->ics.group_len[w]; w2++) - s->coder->quantize_and_encode_band(s, &s->pb, sce->coeffs + start + w2*128, + s->coder->quantize_and_encode_band(s, &s->pb, + &sce->coeffs[start + w2*128], + &sce->pqcoeffs[start + w2*128], sce->ics.swb_sizes[i], sce->sf_idx[w*16 + i], sce->band_type[w*16 + i], - s->lambda, sce->ics.window_clipping[w]); + s->lambda, + sce->ics.window_clipping[w]); start += sce->ics.swb_sizes[i]; } } |