summaryrefslogtreecommitdiff
path: root/libavcodec/ra288.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-06-08 23:02:54 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-06-08 23:59:09 +0200
commit7e22514d98ecd56cc4e55dac7c813551e2152b80 (patch)
tree13c47e1e1215525323177a008d5406a7d61a418a /libavcodec/ra288.c
parente016e3c9d7ce1493b952bdd8232f7e03077469a3 (diff)
parent3b81a18ba30bf18bab78f56744d8f3e1e4060104 (diff)
downloadffmpeg-7e22514d98ecd56cc4e55dac7c813551e2152b80.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: float_dsp: ppc: add a separate header for Altivec function prototypes ARM: fix float_dsp breakage from d5a7229 Add a float DSP framework to libavutil PPC: Move types_altivec.h and util_altivec.h from libavcodec to libavutil ARM: Move asm.S from libavcodec to libavutil vc1dsp: mark put/avg_vc1_mspel_mc() always_inline Merged-by: Michael Niedermayer <michaelni@gmx.at>
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 2d1208d8fd..ca10565a2e 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));
}