summaryrefslogtreecommitdiff
path: root/libavcodec/ra144enc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-03-05 14:17:55 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-03-05 14:20:03 +0100
commit100e8f8b67b40ea1bcc858df5ee8e50012c0959d (patch)
tree042f9cba02e53a8bef0ab5deb60312a3cdf5c626 /libavcodec/ra144enc.c
parent93c4cd618cd2222a2f1594f19a063e2d8d955483 (diff)
downloadffmpeg-100e8f8b67b40ea1bcc858df5ee8e50012c0959d.tar.gz
avcodec/ra144enc: avoid calling emms when the SSE2 version is used
emms is a rather slow operation Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ra144enc.c')
-rw-r--r--libavcodec/ra144enc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/ra144enc.c b/libavcodec/ra144enc.c
index cafedda8c1..7f7c9f39b7 100644
--- a/libavcodec/ra144enc.c
+++ b/libavcodec/ra144enc.c
@@ -34,7 +34,7 @@
#include "mathops.h"
#include "put_bits.h"
#include "ra144.h"
-
+#include "libavutil/x86/cpu.h"
static av_cold int ra144_encode_close(AVCodecContext *avctx)
{
@@ -376,7 +376,8 @@ static void ra144_encode_subblock(RA144Context *ractx,
ff_copy_and_dup(ractx->buffer_a, ractx->adapt_cb, cba_idx + BLOCKSIZE / 2 - 1);
m[0] = (ff_irms(&ractx->dsp, ractx->buffer_a) * rms) >> 12;
- emms_c();
+ if (!EXTERNAL_SSE2(av_get_cpu_flags()))
+ emms_c();
}
fixed_cb_search(work + LPC_ORDER, coefs, data, cba_idx, &cb1_idx, &cb2_idx);
for (i = 0; i < BLOCKSIZE; i++) {