~ubuntu-branches/ubuntu/lucid/ffmpeg/lucid-security

« back to all changes in this revision

Viewing changes to libavcodec/fft.c

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2009-03-13 09:18:28 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20090313091828-n4ktby5eca487uhv
Tags: 3:0.svn20090303-1ubuntu1+unstripped1
merge from ubuntu.jaunty branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
    n = 1 << nbits;
72
72
 
73
73
    s->tmp_buf = NULL;
74
 
    s->exptab = av_malloc((n / 2) * sizeof(FFTComplex));
 
74
    s->exptab  = av_malloc((n / 2) * sizeof(FFTComplex));
75
75
    if (!s->exptab)
76
76
        goto fail;
77
77
    s->revtab = av_malloc(n * sizeof(uint16_t));
82
82
    s2 = inverse ? 1.0 : -1.0;
83
83
 
84
84
    s->fft_permute = ff_fft_permute_c;
85
 
    s->fft_calc = ff_fft_calc_c;
86
 
    s->imdct_calc = ff_imdct_calc_c;
87
 
    s->imdct_half = ff_imdct_half_c;
88
 
    s->exptab1 = NULL;
 
85
    s->fft_calc    = ff_fft_calc_c;
 
86
    s->imdct_calc  = ff_imdct_calc_c;
 
87
    s->imdct_half  = ff_imdct_half_c;
 
88
    s->exptab1     = NULL;
89
89
 
90
90
#if HAVE_MMX && HAVE_YASM
91
91
    has_vectors = mm_support();
92
 
    if (has_vectors & FF_MM_SSE) {
 
92
    if (has_vectors & FF_MM_SSE && HAVE_SSE) {
93
93
        /* SSE for P3/P4/K8 */
94
 
        s->imdct_calc = ff_imdct_calc_sse;
95
 
        s->imdct_half = ff_imdct_half_sse;
 
94
        s->imdct_calc  = ff_imdct_calc_sse;
 
95
        s->imdct_half  = ff_imdct_half_sse;
96
96
        s->fft_permute = ff_fft_permute_sse;
97
 
        s->fft_calc = ff_fft_calc_sse;
98
 
    } else if (has_vectors & FF_MM_3DNOWEXT) {
 
97
        s->fft_calc    = ff_fft_calc_sse;
 
98
    } else if (has_vectors & FF_MM_3DNOWEXT && HAVE_AMD3DNOWEXT) {
99
99
        /* 3DNowEx for K7 */
100
100
        s->imdct_calc = ff_imdct_calc_3dn2;
101
101
        s->imdct_half = ff_imdct_half_3dn2;
102
 
        s->fft_calc = ff_fft_calc_3dn2;
103
 
    } else if (has_vectors & FF_MM_3DNOW) {
 
102
        s->fft_calc   = ff_fft_calc_3dn2;
 
103
    } else if (has_vectors & FF_MM_3DNOW && HAVE_AMD3DNOW) {
104
104
        /* 3DNow! for K6-2/3 */
105
105
        s->imdct_calc = ff_imdct_calc_3dn;
106
106
        s->imdct_half = ff_imdct_half_3dn;
107
 
        s->fft_calc = ff_fft_calc_3dn;
 
107
        s->fft_calc   = ff_fft_calc_3dn;
108
108
    }
109
109
#elif HAVE_ALTIVEC && !defined ALTIVEC_USE_REFERENCE_C_CODE
110
110
    has_vectors = mm_support();