Revision ccf22d3e libavcodec/ppc/check_altivec.c

View differences:

libavcodec/ppc/check_altivec.c
43 43
 * is present.
44 44
 */
45 45

  
46
int has_altivec(void)
46
int mm_support(void)
47 47
{
48
#if HAVE_ALTIVEC
48 49
#ifdef __AMIGAOS4__
49 50
    ULONG result = 0;
50 51
    extern struct ExecIFace *IExec;
51 52

  
52 53
    IExec->GetCPUInfoTags(GCIT_VectorUnit, &result, TAG_DONE);
53
    if (result == VECTORTYPE_ALTIVEC) return 1;
54
    if (result == VECTORTYPE_ALTIVEC)
55
        return AV_CPU_FLAG_ALTIVEC;
54 56
    return 0;
55 57
#elif defined(__APPLE__) || defined(__OpenBSD__)
56 58
#ifdef __OpenBSD__
......
64 66

  
65 67
    err = sysctl(sels, 2, &has_vu, &len, NULL, 0);
66 68

  
67
    if (err == 0) return has_vu != 0;
69
    if (err == 0)
70
        return has_vu ? AV_CPU_FLAG_ALTIVEC : 0;
68 71
    return 0;
69 72
#elif CONFIG_RUNTIME_CPUDETECT
70 73
    int proc_ver;
......
76 79
        proc_ver == 0x0039 || proc_ver == 0x003c ||
77 80
        proc_ver == 0x0044 || proc_ver == 0x0045 ||
78 81
        proc_ver == 0x0070)
79
        return 1;
82
        return AV_CPU_FLAG_ALTIVEC;
80 83
    return 0;
81 84
#else
82 85
    // Since we were compiled for AltiVec, just assume we have it
83 86
    // until someone comes up with a proper way (not involving signal hacks).
84
    return 1;
87
    return AV_CPU_FLAG_ALTIVEC;
85 88
#endif /* __AMIGAOS4__ */
89
#endif /* HAVE_ALTIVEC */
90
    return 0;
86 91
}
87 92

  

Also available in: Unified diff