Revision eba586b0 libavutil/x86/cpu.c

View differences:

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