OSDN Git Service

ra144enc: fix use of scalarprod_int16
authorChristophe Gisquet <christophe.gisquet@gmail.com>
Wed, 5 Mar 2014 12:00:23 +0000 (13:00 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 5 Mar 2014 12:56:06 +0000 (13:56 +0100)
c3390fd56cf55259ea7665ecea6c8aeddf56e2fc made use of the DSP function
but did not complement it with a call to emms, which is done here before
computations involving floats are performed.

Fixes ticket #3429, which affected MMX/MMXExt machines.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/ra144enc.c

index d09e281..cafedda 100644 (file)
@@ -376,6 +376,7 @@ 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();
     }
     fixed_cb_search(work + LPC_ORDER, coefs, data, cba_idx, &cb1_idx, &cb2_idx);
     for (i = 0; i < BLOCKSIZE; i++) {