Revision 9ac4548f

View differences:

libavcodec/x86/h264dsp_mmx.c
850 850
                          "m"(mv[l][b_idx+d_idx+2][0])
851 851
                    );
852 852
                }
853
                if(bidir==1){
854
                    __asm__ volatile("pxor %%mm3, %%mm3 \n\t":);
855
                    for( l = bidir; l >= 0; l-- ) {
856
                    __asm__ volatile(
857
                        "movd %0, %%mm1 \n\t"
858
                        "punpckldq %1, %%mm1 \n\t"
859
                        "punpckldq %%mm1, %%mm2 \n\t"
860
                        "pcmpeqb %%mm2, %%mm1 \n\t"
861
                        "paddb %%mm6, %%mm1 \n\t"
862
                        "punpckhbw %%mm7, %%mm1 \n\t" // ref[b] != ref[bn]
863
                        "por %%mm1, %%mm3 \n\t"
864

  
865
                        "movq %2, %%mm1 \n\t"
866
                        "movq %3, %%mm2 \n\t"
867
                        "psubw %4, %%mm1 \n\t"
868
                        "psubw %5, %%mm2 \n\t"
869
                        "packsswb %%mm2, %%mm1 \n\t"
870
                        "paddb %%mm5, %%mm1 \n\t"
871
                        "pminub %%mm4, %%mm1 \n\t"
872
                        "pcmpeqb %%mm4, %%mm1 \n\t" // abs(mv[b] - mv[bn]) >= limit
873
                        "por %%mm1, %%mm3 \n\t"
874
                        ::"m"(ref[l][b_idx]),
875
                          "m"(ref[1-l][b_idx+d_idx]),
876
                          "m"(mv[l][b_idx][0]),
877
                          "m"(mv[l][b_idx+2][0]),
878
                          "m"(mv[1-l][b_idx+d_idx][0]),
879
                          "m"(mv[1-l][b_idx+d_idx+2][0])
880
                    );
881
                    }
882
                    __asm__ volatile(
883
                        "pcmpeqw %%mm7, %%mm3 \n\t"
884
                        "psubusw %%mm3, %%mm0 \n\t"
885
                    :);
886
                }
853 887
            }
854 888
            __asm__ volatile(
855 889
                "movd %0, %%mm1 \n\t"

Also available in: Unified diff