Revision 1d67b037 libavcodec/i386/dsputil_mmx.c

View differences:

libavcodec/i386/dsputil_mmx.c
3523 3523
            c->avg_h264_chroma_pixels_tab[1]= avg_h264_chroma_mc4_3dnow;
3524 3524
        }
3525 3525

  
3526
/* FIXME works in most codecs, but crashes svq1 due to unaligned chroma
3526

  
3527
#define H264_QPEL_FUNCS(x, y, CPU)\
3528
            c->put_h264_qpel_pixels_tab[0][x+y*4] = put_h264_qpel16_mc##x##y##_##CPU;\
3529
            c->put_h264_qpel_pixels_tab[1][x+y*4] = put_h264_qpel8_mc##x##y##_##CPU;\
3530
            c->avg_h264_qpel_pixels_tab[0][x+y*4] = avg_h264_qpel16_mc##x##y##_##CPU;\
3531
            c->avg_h264_qpel_pixels_tab[1][x+y*4] = avg_h264_qpel8_mc##x##y##_##CPU;
3527 3532
        if((mm_flags & MM_SSE2) && !(mm_flags & MM_3DNOW)){
3528 3533
            // these functions are slower than mmx on AMD, but faster on Intel
3534
/* FIXME works in most codecs, but crashes svq1 due to unaligned chroma
3529 3535
            c->put_pixels_tab[0][0] = put_pixels16_sse2;
3530 3536
            c->avg_pixels_tab[0][0] = avg_pixels16_sse2;
3531
        }
3532 3537
*/
3533

  
3538
            H264_QPEL_FUNCS(0, 0, sse2);
3539
        }
3540
        if(mm_flags & MM_SSE2){
3541
            H264_QPEL_FUNCS(0, 1, sse2);
3542
            H264_QPEL_FUNCS(0, 2, sse2);
3543
            H264_QPEL_FUNCS(0, 3, sse2);
3544
            H264_QPEL_FUNCS(1, 1, sse2);
3545
            H264_QPEL_FUNCS(1, 2, sse2);
3546
            H264_QPEL_FUNCS(1, 3, sse2);
3547
            H264_QPEL_FUNCS(2, 1, sse2);
3548
            H264_QPEL_FUNCS(2, 2, sse2);
3549
            H264_QPEL_FUNCS(2, 3, sse2);
3550
            H264_QPEL_FUNCS(3, 1, sse2);
3551
            H264_QPEL_FUNCS(3, 2, sse2);
3552
            H264_QPEL_FUNCS(3, 3, sse2);
3553
        }
3534 3554
#ifdef HAVE_SSSE3
3535 3555
        if(mm_flags & MM_SSSE3){
3536
            SET_QPEL_FUNCS(put_h264_qpel, 0, 16, ssse3);
3537
            SET_QPEL_FUNCS(put_h264_qpel, 1, 8, ssse3);
3538
            SET_QPEL_FUNCS(avg_h264_qpel, 0, 16, ssse3);
3539
            SET_QPEL_FUNCS(avg_h264_qpel, 1, 8, ssse3);
3556
            H264_QPEL_FUNCS(1, 0, ssse3);
3557
            H264_QPEL_FUNCS(1, 1, ssse3);
3558
            H264_QPEL_FUNCS(1, 2, ssse3);
3559
            H264_QPEL_FUNCS(1, 3, ssse3);
3560
            H264_QPEL_FUNCS(2, 0, ssse3);
3561
            H264_QPEL_FUNCS(2, 1, ssse3);
3562
            H264_QPEL_FUNCS(2, 2, ssse3);
3563
            H264_QPEL_FUNCS(2, 3, ssse3);
3564
            H264_QPEL_FUNCS(3, 0, ssse3);
3565
            H264_QPEL_FUNCS(3, 1, ssse3);
3566
            H264_QPEL_FUNCS(3, 2, ssse3);
3567
            H264_QPEL_FUNCS(3, 3, ssse3);
3540 3568
        }
3541 3569
#endif
3542 3570

  

Also available in: Unified diff