~ubuntu-branches/ubuntu/vivid/ffmpeg/vivid-updates

« back to all changes in this revision

Viewing changes to libswscale/swscale.c

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2010-03-04 10:34:37 UTC
  • mfrom: (1.1.11 upstream) (0.2.2 sid)
  • Revision ID: james.westby@ubuntu.com-20100304103437-mj2hpq7a581pzrxv
Tags: 4:0.5.1-1ubuntu1
* merge from debian. remaining changes:
  - don't disable encoders
  - don't build against libfaad, libdirac and libopenjpeg (all in universe)

Show diffs side-by-side

added added

removed removed

Lines of Context:
955
955
 
956
956
//Note: we have C, X86, MMX, MMX2, 3DNOW versions, there is no 3DNOW+MMX2 one
957
957
//Plain C versions
958
 
#if ((!HAVE_MMX || !CONFIG_GPL) && !HAVE_ALTIVEC) || defined (RUNTIME_CPUDETECT)
 
958
#if ((!HAVE_MMX || !CONFIG_GPL) && !HAVE_ALTIVEC) || CONFIG_RUNTIME_CPUDETECT
959
959
#define COMPILE_C
960
960
#endif
961
961
 
962
962
#if ARCH_PPC
963
 
#if HAVE_ALTIVEC || defined (RUNTIME_CPUDETECT)
 
963
#if HAVE_ALTIVEC || CONFIG_RUNTIME_CPUDETECT
964
964
#define COMPILE_ALTIVEC
965
965
#endif
966
966
#endif //ARCH_PPC
967
967
 
968
968
#if ARCH_X86
969
969
 
970
 
#if ((HAVE_MMX && !HAVE_AMD3DNOW && !HAVE_MMX2) || defined (RUNTIME_CPUDETECT)) && CONFIG_GPL
 
970
#if ((HAVE_MMX && !HAVE_AMD3DNOW && !HAVE_MMX2) || CONFIG_RUNTIME_CPUDETECT) && CONFIG_GPL
971
971
#define COMPILE_MMX
972
972
#endif
973
973
 
974
 
#if (HAVE_MMX2 || defined (RUNTIME_CPUDETECT)) && CONFIG_GPL
 
974
#if (HAVE_MMX2 || CONFIG_RUNTIME_CPUDETECT) && CONFIG_GPL
975
975
#define COMPILE_MMX2
976
976
#endif
977
977
 
978
 
#if ((HAVE_AMD3DNOW && !HAVE_MMX2) || defined (RUNTIME_CPUDETECT)) && CONFIG_GPL
 
978
#if ((HAVE_AMD3DNOW && !HAVE_MMX2) || CONFIG_RUNTIME_CPUDETECT) && CONFIG_GPL
979
979
#define COMPILE_3DNOW
980
980
#endif
981
981
#endif //ARCH_X86
1636
1636
 
1637
1637
static SwsFunc getSwsFunc(int flags){
1638
1638
 
1639
 
#if defined(RUNTIME_CPUDETECT)
 
1639
#if CONFIG_RUNTIME_CPUDETECT
1640
1640
#if ARCH_X86 && CONFIG_GPL
1641
1641
    // ordered per speed fastest first
1642
1642
    if (flags & SWS_CPU_CAPS_MMX2)
1657
1657
#endif
1658
1658
    return swScale_C;
1659
1659
#endif /* ARCH_X86 && CONFIG_GPL */
1660
 
#else //RUNTIME_CPUDETECT
 
1660
#else //CONFIG_RUNTIME_CPUDETECT
1661
1661
#if   HAVE_MMX2
1662
1662
    return swScale_MMX2;
1663
1663
#elif HAVE_AMD3DNOW
1669
1669
#else
1670
1670
    return swScale_C;
1671
1671
#endif
1672
 
#endif //!RUNTIME_CPUDETECT
 
1672
#endif //!CONFIG_RUNTIME_CPUDETECT
1673
1673
}
1674
1674
 
1675
1675
static int PlanarToNV12Wrapper(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
2193
2193
        __asm__ volatile("emms\n\t"::: "memory");
2194
2194
#endif
2195
2195
 
2196
 
#if !defined(RUNTIME_CPUDETECT) //ensure that the flags match the compiled variant if cpudetect is off
 
2196
#if !CONFIG_RUNTIME_CPUDETECT //ensure that the flags match the compiled variant if cpudetect is off
2197
2197
    flags &= ~(SWS_CPU_CAPS_MMX|SWS_CPU_CAPS_MMX2|SWS_CPU_CAPS_3DNOW|SWS_CPU_CAPS_ALTIVEC|SWS_CPU_CAPS_BFIN);
2198
2198
#if   HAVE_MMX2
2199
2199
    flags |= SWS_CPU_CAPS_MMX|SWS_CPU_CAPS_MMX2;
2206
2206
#elif ARCH_BFIN
2207
2207
    flags |= SWS_CPU_CAPS_BFIN;
2208
2208
#endif
2209
 
#endif /* RUNTIME_CPUDETECT */
 
2209
#endif /* CONFIG_RUNTIME_CPUDETECT */
2210
2210
    if (clip_table[512] != 255) globalInit();
2211
2211
    if (!rgb15to16) sws_rgb2rgb_init(flags);
2212
2212