summaryrefslogtreecommitdiff
path: root/libavcodec/ra288.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2012-05-21 12:58:41 -0400
committerJustin Ruggles <justin.ruggles@gmail.com>2012-06-08 13:14:38 -0400
commitd5a7229ba4aabc2b6407c731d9175879ae54c5ea (patch)
tree0596aaae9622f0f7b7e5d689b20ab3dc82f59897 /libavcodec/ra288.c
parent98db4e2a4e35ccc2406004216270ceaa1c6a7d00 (diff)
Add a float DSP framework to libavutil
Move vector_fmul() from DSPContext to AVFloatDSPContext.
Diffstat (limited to 'libavcodec/ra288.c')
-rw-r--r--libavcodec/ra288.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libavcodec/ra288.c b/libavcodec/ra288.c
index d7cda3ccf8..aa7ad33312 100644
--- a/libavcodec/ra288.c
+++ b/libavcodec/ra288.c
@@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/float_dsp.h"
#include "avcodec.h"
#define BITSTREAM_READER_LE
#include "get_bits.h"
@@ -26,7 +27,6 @@
#include "lpc.h"
#include "celp_math.h"
#include "celp_filters.h"
-#include "dsputil.h"
#define MAX_BACKWARD_FILTER_ORDER 36
#define MAX_BACKWARD_FILTER_LEN 40
@@ -38,6 +38,7 @@
typedef struct {
AVFrame frame;
DSPContext dsp;
+ AVFloatDSPContext fdsp;
DECLARE_ALIGNED(32, float, sp_lpc)[FFALIGN(36, 16)]; ///< LPC coefficients for speech data (spec: A)
DECLARE_ALIGNED(32, float, gain_lpc)[FFALIGN(10, 16)]; ///< LPC coefficients for gain (spec: GB)
@@ -62,7 +63,7 @@ static av_cold int ra288_decode_init(AVCodecContext *avctx)
{
RA288Context *ractx = avctx->priv_data;
avctx->sample_fmt = AV_SAMPLE_FMT_FLT;
- ff_dsputil_init(&ractx->dsp, avctx);
+ avpriv_float_dsp_init(&ractx->fdsp, avctx->flags & CODEC_FLAG_BITEXACT);
avcodec_get_frame_defaults(&ractx->frame);
avctx->coded_frame = &ractx->frame;
@@ -137,7 +138,7 @@ static void do_hybrid_window(RA288Context *ractx,
MAX_BACKWARD_FILTER_LEN +
MAX_BACKWARD_FILTER_NONREC, 16)]);
- ractx->dsp.vector_fmul(work, window, hist, FFALIGN(order + n + non_rec, 16));
+ ractx->fdsp.vector_fmul(work, window, hist, FFALIGN(order + n + non_rec, 16));
convolve(buffer1, work + order , n , order);
convolve(buffer2, work + order + n, non_rec, order);
@@ -164,7 +165,7 @@ static void backward_filter(RA288Context *ractx,
do_hybrid_window(ractx, order, n, non_rec, temp, hist, rec, window);
if (!compute_lpc_coefs(temp, order, lpc, 0, 1, 1))
- ractx->dsp.vector_fmul(lpc, lpc, tab, FFALIGN(order, 16));
+ ractx->fdsp.vector_fmul(lpc, lpc, tab, FFALIGN(order, 16));
memmove(hist, hist + n, move_size*sizeof(*hist));
}