Revision 7160bb71 libavcodec/x86/cpuid.c

View differences:

libavcodec/x86/cpuid.c
79 79
        family = ((eax>>8)&0xf) + ((eax>>20)&0xff);
80 80
        model  = ((eax>>4)&0xf) + ((eax>>12)&0xf0);
81 81
        if (std_caps & (1<<23))
82
            rval |= FF_MM_MMX;
82
            rval |= AV_CPU_FLAG_MMX;
83 83
        if (std_caps & (1<<25))
84
            rval |= FF_MM_MMX2
84
            rval |= AV_CPU_FLAG_MMX2
85 85
#if HAVE_SSE
86
                  | FF_MM_SSE;
86
                  | AV_CPU_FLAG_SSE;
87 87
        if (std_caps & (1<<26))
88
            rval |= FF_MM_SSE2;
88
            rval |= AV_CPU_FLAG_SSE2;
89 89
        if (ecx & 1)
90
            rval |= FF_MM_SSE3;
90
            rval |= AV_CPU_FLAG_SSE3;
91 91
        if (ecx & 0x00000200 )
92
            rval |= FF_MM_SSSE3;
92
            rval |= AV_CPU_FLAG_SSSE3;
93 93
        if (ecx & 0x00080000 )
94
            rval |= FF_MM_SSE4;
94
            rval |= AV_CPU_FLAG_SSE4;
95 95
        if (ecx & 0x00100000 )
96
            rval |= FF_MM_SSE42;
96
            rval |= AV_CPU_FLAG_SSE42;
97 97
#endif
98 98
                  ;
99 99
    }
......
103 103
    if(max_ext_level >= 0x80000001){
104 104
        cpuid(0x80000001, eax, ebx, ecx, ext_caps);
105 105
        if (ext_caps & (1<<31))
106
            rval |= FF_MM_3DNOW;
106
            rval |= AV_CPU_FLAG_3DNOW;
107 107
        if (ext_caps & (1<<30))
108
            rval |= FF_MM_3DNOWEXT;
108
            rval |= AV_CPU_FLAG_3DNOWEXT;
109 109
        if (ext_caps & (1<<23))
110
            rval |= FF_MM_MMX;
110
            rval |= AV_CPU_FLAG_MMX;
111 111
        if (ext_caps & (1<<22))
112
            rval |= FF_MM_MMX2;
112
            rval |= AV_CPU_FLAG_MMX2;
113 113
    }
114 114

  
115 115
    if (!strncmp(vendor.c, "GenuineIntel", 12) &&
......
117 117
        /* 6/9 (pentium-m "banias"), 6/13 (pentium-m "dothan"), and 6/14 (core1 "yonah")
118 118
         * theoretically support sse2, but it's usually slower than mmx,
119 119
         * so let's just pretend they don't. */
120
        if (rval & FF_MM_SSE2) rval ^= FF_MM_SSE2SLOW|FF_MM_SSE2;
121
        if (rval & FF_MM_SSE3) rval ^= FF_MM_SSE3SLOW|FF_MM_SSE3;
120
        if (rval & AV_CPU_FLAG_SSE2) rval ^= AV_CPU_FLAG_SSE2SLOW|AV_CPU_FLAG_SSE2;
121
        if (rval & AV_CPU_FLAG_SSE3) rval ^= AV_CPU_FLAG_SSE3SLOW|AV_CPU_FLAG_SSE3;
122 122
    }
123 123

  
124 124
#if 0
125 125
    av_log(NULL, AV_LOG_DEBUG, "%s%s%s%s%s%s%s%s%s%s%s%s\n",
126
        (rval&FF_MM_MMX) ? "MMX ":"",
127
        (rval&FF_MM_MMX2) ? "MMX2 ":"",
128
        (rval&FF_MM_SSE) ? "SSE ":"",
129
        (rval&FF_MM_SSE2) ? "SSE2 ":"",
130
        (rval&FF_MM_SSE2SLOW) ? "SSE2(slow) ":"",
131
        (rval&FF_MM_SSE3) ? "SSE3 ":"",
132
        (rval&FF_MM_SSE3SLOW) ? "SSE3(slow) ":"",
133
        (rval&FF_MM_SSSE3) ? "SSSE3 ":"",
134
        (rval&FF_MM_SSE4) ? "SSE4.1 ":"",
135
        (rval&FF_MM_SSE42) ? "SSE4.2 ":"",
136
        (rval&FF_MM_3DNOW) ? "3DNow ":"",
137
        (rval&FF_MM_3DNOWEXT) ? "3DNowExt ":"");
126
        (rval&AV_CPU_FLAG_MMX) ? "MMX ":"",
127
        (rval&AV_CPU_FLAG_MMX2) ? "MMX2 ":"",
128
        (rval&AV_CPU_FLAG_SSE) ? "SSE ":"",
129
        (rval&AV_CPU_FLAG_SSE2) ? "SSE2 ":"",
130
        (rval&AV_CPU_FLAG_SSE2SLOW) ? "SSE2(slow) ":"",
131
        (rval&AV_CPU_FLAG_SSE3) ? "SSE3 ":"",
132
        (rval&AV_CPU_FLAG_SSE3SLOW) ? "SSE3(slow) ":"",
133
        (rval&AV_CPU_FLAG_SSSE3) ? "SSSE3 ":"",
134
        (rval&AV_CPU_FLAG_SSE4) ? "SSE4.1 ":"",
135
        (rval&AV_CPU_FLAG_SSE42) ? "SSE4.2 ":"",
136
        (rval&AV_CPU_FLAG_3DNOW) ? "3DNow ":"",
137
        (rval&AV_CPU_FLAG_3DNOWEXT) ? "3DNowExt ":"");
138 138
#endif
139 139
    return rval;
140 140
}

Also available in: Unified diff