diff --git a/libavcodec/dct-test.c b/libavcodec/dct-test.c index f5813b7bf9..649f15de67 100644 --- a/libavcodec/dct-test.c +++ b/libavcodec/dct-test.c @@ -484,6 +484,7 @@ int main(int argc, char **argv) dct_error("IJG-AAN-INT", 0, fdct_ifast, fdct, test); dct_error("IJG-LLM-INT", 0, ff_jpeg_fdct_islow, fdct, test); dct_error("MMX", 0, ff_fdct_mmx, fdct, test); + dct_error("MMX2", 0, ff_fdct_mmx2, fdct, test); dct_error("FAAN", 0, ff_faandct, fdct, test); } else { dct_error("REF-DBL", 1, idct, idct, test); diff --git a/libavcodec/i386/fdct_mmx.c b/libavcodec/i386/fdct_mmx.c index 9ef269d50f..2f9a5aef96 100644 --- a/libavcodec/i386/fdct_mmx.c +++ b/libavcodec/i386/fdct_mmx.c @@ -233,6 +233,8 @@ static always_inline void fdct_row_mmx2(const int16_t *in, int16_t *out, const i pmaddwd_m2r(*(table + 12), mm1); pmaddwd_m2r(*(table + 24), mm5); pmaddwd_m2r(*(table + 28), mm6); + paddd_r2r(mm4, mm3); + paddd_r2r(mm7, mm2); paddd_r2r(mm1, mm0); paddd_r2r(mm6, mm5); movq_m2r(*fdct_r_row, mm7);