From 10f160768b824f00933f33bc69f1fae89a25dfc8 Mon Sep 17 00:00:00 2001 From: Peter Meerwald Date: Sun, 15 Feb 2015 12:21:22 +0100 Subject: g722: Reduce number of pointers passed to g722_apply_qmf() function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Peter Meerwald Signed-off-by: Martin Storsjö --- libavcodec/g722dec.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'libavcodec/g722dec.c') diff --git a/libavcodec/g722dec.c b/libavcodec/g722dec.c index 4e1815009b..e7058b7ee1 100644 --- a/libavcodec/g722dec.c +++ b/libavcodec/g722dec.c @@ -106,7 +106,7 @@ static int g722_decode_frame(AVCodecContext *avctx, void *data, for (j = 0; j < avpkt->size; j++) { int ilow, ihigh, rlow, rhigh, dhigh; - int xout1, xout2; + int xout[2]; ihigh = get_bits(&gb, 2); ilow = get_bits(&gb, 6 - skip); @@ -124,10 +124,9 @@ static int g722_decode_frame(AVCodecContext *avctx, void *data, c->prev_samples[c->prev_samples_pos++] = rlow + rhigh; c->prev_samples[c->prev_samples_pos++] = rlow - rhigh; - c->dsp.apply_qmf(c->prev_samples + c->prev_samples_pos - 24, - &xout1, &xout2); - *out_buf++ = av_clip_int16(xout1 >> 11); - *out_buf++ = av_clip_int16(xout2 >> 11); + c->dsp.apply_qmf(c->prev_samples + c->prev_samples_pos - 24, xout); + *out_buf++ = av_clip_int16(xout[0] >> 11); + *out_buf++ = av_clip_int16(xout[1] >> 11); if (c->prev_samples_pos >= PREV_SAMPLES_BUF_SIZE) { memmove(c->prev_samples, c->prev_samples + c->prev_samples_pos - 22, 22 * sizeof(c->prev_samples[0])); -- cgit v1.2.3