Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-06-09 01:02:54 +0400
committerMichael Niedermayer <michaelni@gmx.at>2012-06-09 01:59:09 +0400
commit7e22514d98ecd56cc4e55dac7c813551e2152b80 (patch)
tree13c47e1e1215525323177a008d5406a7d61a418a /libavcodec/twinvq.c
parente016e3c9d7ce1493b952bdd8232f7e03077469a3 (diff)
parent3b81a18ba30bf18bab78f56744d8f3e1e4060104 (diff)
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/twinvq.c')
-rw-r--r--libavcodec/twinvq.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libavcodec/twinvq.c b/libavcodec/twinvq.c
index d1ee695bce..071017da2a 100644
--- a/libavcodec/twinvq.c
+++ b/libavcodec/twinvq.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"
#include "get_bits.h"
#include "dsputil.h"
@@ -176,6 +177,7 @@ typedef struct TwinContext {
AVCodecContext *avctx;
AVFrame frame;
DSPContext dsp;
+ AVFloatDSPContext fdsp;
FFTContext mdct_ctx[3];
const ModeTab *mtab;
@@ -787,8 +789,8 @@ static void read_and_decode_spectrum(TwinContext *tctx, GetBitContext *gb,
dec_bark_env(tctx, bark1[i][j], bark_use_hist[i][j], i,
tctx->tmp_buf, gain[sub*i+j], ftype);
- tctx->dsp.vector_fmul(chunk + block_size*j, chunk + block_size*j, tctx->tmp_buf,
- block_size);
+ tctx->fdsp.vector_fmul(chunk + block_size*j, chunk + block_size*j,
+ tctx->tmp_buf, block_size);
}
@@ -809,7 +811,7 @@ static void read_and_decode_spectrum(TwinContext *tctx, GetBitContext *gb,
dec_lpc_spectrum_inv(tctx, lsp, ftype, tctx->tmp_buf);
for (j = 0; j < mtab->fmode[ftype].sub; j++) {
- tctx->dsp.vector_fmul(chunk, chunk, tctx->tmp_buf, block_size);
+ tctx->fdsp.vector_fmul(chunk, chunk, tctx->tmp_buf, block_size);
chunk += block_size;
}
}
@@ -1156,6 +1158,7 @@ static av_cold int twin_decode_init(AVCodecContext *avctx)
}
ff_dsputil_init(&tctx->dsp, avctx);
+ avpriv_float_dsp_init(&tctx->fdsp, avctx->flags & CODEC_FLAG_BITEXACT);
if ((ret = init_mdct_win(tctx))) {
av_log(avctx, AV_LOG_ERROR, "Error initializing MDCT\n");
twin_decode_close(avctx);