Revision 40fa5140 libswscale/swscale.c

View differences:

libswscale/swscale.c
1776 1776
    }
1777 1777
}
1778 1778

  
1779
static SwsFunc getSwsFunc(int flags)
1779
static SwsFunc getSwsFunc(SwsContext *c)
1780 1780
{
1781
    int flags = c->flags;
1781 1782

  
1782 1783
#if defined(RUNTIME_CPUDETECT) && CONFIG_GPL
1783 1784
#if ARCH_X86
1784 1785
    // ordered per speed fastest first
1785 1786
    if (flags & SWS_CPU_CAPS_MMX2) {
1787
        sws_init_swScale_MMX2(c);
1786 1788
        return swScale_MMX2;
1787 1789
    } else if (flags & SWS_CPU_CAPS_3DNOW) {
1790
        sws_init_swScale_3DNow(c);
1788 1791
        return swScale_3DNow;
1789 1792
    } else if (flags & SWS_CPU_CAPS_MMX) {
1793
        sws_init_swScale_MMX(c);
1790 1794
        return swScale_MMX;
1791 1795
    } else {
1796
        sws_init_swScale_C(c);
1792 1797
        return swScale_C;
1793 1798
    }
1794 1799

  
1795 1800
#else
1796 1801
#if ARCH_PPC
1797 1802
    if (flags & SWS_CPU_CAPS_ALTIVEC) {
1803
        sws_init_swScale_altivec(c);
1798 1804
        return swScale_altivec;
1799 1805
    } else {
1806
        sws_init_swScale_C(c);
1800 1807
        return swScale_C;
1801 1808
    }
1802 1809
#endif
1810
    sws_init_swScale_C(c);
1803 1811
    return swScale_C;
1804 1812
#endif /* ARCH_X86 */
1805 1813
#else //RUNTIME_CPUDETECT
1806 1814
#if   HAVE_MMX2
1815
    sws_init_swScale_MMX2(c);
1807 1816
    return swScale_MMX2;
1808 1817
#elif HAVE_AMD3DNOW
1818
    sws_init_swScale_3DNow(c);
1809 1819
    return swScale_3DNow;
1810 1820
#elif HAVE_MMX
1821
    sws_init_swScale_MMX(c);
1811 1822
    return swScale_MMX;
1812 1823
#elif HAVE_ALTIVEC
1824
    sws_init_swScale_altivec(c);
1813 1825
    return swScale_altivec;
1814 1826
#else
1827
    sws_init_swScale_C(c);
1815 1828
    return swScale_C;
1816 1829
#endif
1817 1830
#endif //!RUNTIME_CPUDETECT
......
2932 2945
               c->chrSrcW, c->chrSrcH, c->chrDstW, c->chrDstH, c->chrXInc, c->chrYInc);
2933 2946
    }
2934 2947

  
2935
    c->swScale= getSwsFunc(flags);
2948
    c->swScale= getSwsFunc(c);
2936 2949
    return c;
2937 2950
}
2938 2951

  

Also available in: Unified diff