dca: use vector_fmac_scalar from dsputil
authorMans Rullgard <mans@mansr.com>
Wed, 28 Sep 2011 13:34:04 +0000 (14:34 +0100)
committerMans Rullgard <mans@mansr.com>
Wed, 28 Sep 2011 14:56:09 +0000 (15:56 +0100)
Signed-off-by: Mans Rullgard <mans@mansr.com>
libavcodec/dca.c

index 58f3420..db794a7 100644 (file)
@@ -1829,11 +1829,8 @@ static int dca_decode_frame(AVCodecContext * avctx,
             float* back_chan = s->samples + s->channel_order_tab[s->xch_base_channel] * 256;
             float* lt_chan   = s->samples + s->channel_order_tab[s->xch_base_channel - 2] * 256;
             float* rt_chan   = s->samples + s->channel_order_tab[s->xch_base_channel - 1] * 256;
-            int j;
-            for(j = 0; j < 256; ++j) {
-                lt_chan[j] -= back_chan[j] * M_SQRT1_2;
-                rt_chan[j] -= back_chan[j] * M_SQRT1_2;
-            }
+            s->dsp.vector_fmac_scalar(lt_chan, back_chan, -M_SQRT1_2, 256);
+            s->dsp.vector_fmac_scalar(rt_chan, back_chan, -M_SQRT1_2, 256);
         }
 
         if (avctx->sample_fmt == AV_SAMPLE_FMT_FLT) {