Revision eba586b0

View differences:

libavutil/cpu.c
58 58
           cpu_flags & AV_CPU_FLAG_SSE3     ? "SSE3 "       : "",
59 59
           cpu_flags & AV_CPU_FLAG_SSE3SLOW ? "SSE3(slow) " : "",
60 60
           cpu_flags & AV_CPU_FLAG_SSSE3    ? "SSSE3 "      : "",
61
           cpu_flags & AV_CPU_FLAG_ATOM     ? "Atom "       : "",
61 62
           cpu_flags & AV_CPU_FLAG_SSE4     ? "SSE4.1 "     : "",
62 63
           cpu_flags & AV_CPU_FLAG_SSE42    ? "SSE4.2 "     : "",
63 64
           cpu_flags & AV_CPU_FLAG_AVX      ? "AVX "        : "",
libavutil/cpu.h
34 34
#define AV_CPU_FLAG_SSE3         0x0040 ///< Prescott SSE3 functions
35 35
#define AV_CPU_FLAG_SSE3SLOW 0x20000000 ///< SSE3 supported, but usually not faster
36 36
#define AV_CPU_FLAG_SSSE3        0x0080 ///< Conroe SSSE3 functions
37
#define AV_CPU_FLAG_ATOM     0x10000000 ///< Atom processor, some SSSE3 instructions are slower
37 38
#define AV_CPU_FLAG_SSE4         0x0100 ///< Penryn SSE4.1 functions
38 39
#define AV_CPU_FLAG_SSE42        0x0200 ///< Nehalem SSE4.2 functions
39 40
#define AV_CPU_FLAG_AVX          0x4000 ///< AVX functions: requires OS support even if YMM registers aren't used
libavutil/x86/cpu.c
135 135
        }
136 136
    }
137 137

  
138
    if (!strncmp(vendor.c, "GenuineIntel", 12) &&
139
        family == 6 && (model == 9 || model == 13 || model == 14)) {
138
    if (!strncmp(vendor.c, "GenuineIntel", 12)) {
139
        if (family == 6 && (model == 9 || model == 13 || model == 14)) {
140 140
        /* 6/9 (pentium-m "banias"), 6/13 (pentium-m "dothan"), and 6/14 (core1 "yonah")
141 141
         * theoretically support sse2, but it's usually slower than mmx,
142 142
         * so let's just pretend they don't. AV_CPU_FLAG_SSE2 is disabled and
......
145 145
         * situation applies for AV_CPU_FLAG_SSE3 and AV_CPU_FLAG_SSE3SLOW. */
146 146
        if (rval & AV_CPU_FLAG_SSE2) rval ^= AV_CPU_FLAG_SSE2SLOW|AV_CPU_FLAG_SSE2;
147 147
        if (rval & AV_CPU_FLAG_SSE3) rval ^= AV_CPU_FLAG_SSE3SLOW|AV_CPU_FLAG_SSE3;
148
        }
149
        /* The Atom processor has SSSE3 support, which is useful in many cases,
150
         * but sometimes the SSSE3 version is slower than the SSE2 equivalent
151
         * on the Atom, but is generally faster on other processors supporting
152
         * SSSE3. This flag allows for selectively disabling certain SSSE3
153
         * functions on the Atom. */
154
        if (family == 6 && model == 28)
155
            rval |= AV_CPU_FLAG_ATOM;
148 156
    }
149 157

  
150 158
    return rval;

Also available in: Unified diff