summaryrefslogtreecommitdiff
path: root/libavcodec/i386/idct_mmx.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2005-06-01 01:18:41 +0000
committerMichael Niedermayer <michaelni@gmx.at>2005-06-01 01:18:41 +0000
commit1f3dbc09b14adcc7611e256b502e2ffeb6cf4625 (patch)
treef8572e7fc56e6f534925b959486a49fa53fd3a8b /libavcodec/i386/idct_mmx.c
parent1d62fc856067e7c2b1379ac1e2938b16497e9b25 (diff)
add rounding bias before the horizontal idct (765->730 dezicyles on duron)
Originally committed as revision 4330 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/i386/idct_mmx.c')
-rw-r--r--libavcodec/i386/idct_mmx.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/i386/idct_mmx.c b/libavcodec/i386/idct_mmx.c
index 6587455179..4ad7980d63 100644
--- a/libavcodec/i386/idct_mmx.c
+++ b/libavcodec/i386/idct_mmx.c
@@ -641,7 +641,6 @@ declare_idct (ff_mmx_idct, mmx_table,
#define STORE_DIFF_4P( p, t, pw32, z, dst ) \
asm volatile(\
- "paddw "#pw32", "#p" \n\t"\
"psraw $6, "#p" \n\t"\
"movd (%0), "#t" \n\t"\
"punpcklbw "#z", "#t" \n\t"\
@@ -665,9 +664,12 @@ void ff_h264_idct_add_mmx2(uint8_t *dst, int16_t *block, int stride)
/* mm1=s02+s13 mm2=s02-s13 mm4=d02+d13 mm0=d02-d13 */
IDCT4_1D( %%mm2, %%mm1, %%mm0, %%mm3, %%mm4, %%mm5 )
+ "movq ff_pw_32, %%mm6 \n\t"
/* in: 1,4,0,2 out: 1,2,3,0 */
TRANSPOSE4( %%mm1, %%mm4, %%mm0, %%mm2, %%mm3 )
+ "paddw %%mm6, %%mm1 \n\t"
+
/* mm2=s02+s13 mm3=s02-s13 mm4=d02+d13 mm1=d02-d13 */
IDCT4_1D( %%mm3, %%mm2, %%mm1, %%mm0, %%mm4, %%mm5 )
@@ -675,7 +677,6 @@ void ff_h264_idct_add_mmx2(uint8_t *dst, int16_t *block, int stride)
TRANSPOSE4( %%mm2, %%mm4, %%mm1, %%mm3, %%mm0 )
"pxor %%mm7, %%mm7 \n\t"
- "movq ff_pw_32, %%mm6 \n\t"
:: );
STORE_DIFF_4P( %%mm2, %%mm4, %%mm6, %%mm7, &dst[0*stride] );