Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-05-14 22:12:47 +0400
committerMichael Niedermayer <michaelni@gmx.at>2012-05-14 22:17:24 +0400
commit7e944159c63c4d4504cf76f90bb668519c3109af (patch)
tree99c916277e5523ae607f50cdde69030513b70d39 /libavcodec/x86
parent281bde27894f994d0982ab9283f15d6073ae352c (diff)
parent100c70b0481b889d522b4fc2aac5b948ddb05c70 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: (25 commits) vcr1: Add vcr1_ prefixes to all static functions with generic names. vcr1: Fix return type of common_init to match the function pointer signature. vcr1enc: Replace obsolete get_bit_count by put_bits_count/flush_put_bits. motion-test: remove disabled code gxfenc: remove disabled half-implemented MJPEG tag x86: use more standard construct for setting ASM functions in FFT code fate: westwood-aud: disable decoding fate: caf: disable decoding fate: film-cvid: drop pcm audio and rename test fate: d-cinema-demux: drop unnecessary flags fate: split off dpcm-interplay from interplay-mve tests fate: rename funcom-iss to adpcm-ima-iss fate: rename cryo-apc to adpcm-ima-apc fate: rename adpcm-psx-str-v3 to adpcm-xa fate: split off adpcm-ms-mono test from dxa-feeble fate: split off adpcm-ima-ws test from vqa-cc fate: add adpcm-ima-smjpeg test fate: split off adpcm-ima-amv from amv test fate: separate bmv audio and video tests fate: separate delphine-cin audio and video tests ... Conflicts: doc/platform.texi libavcodec/vcr1.c tests/fate/audio.mak tests/fate/demux.mak tests/fate/video.mak tests/ref/fate/ea-mad-pcm-planar tests/ref/fate/interplay-mve-16bit tests/ref/fate/interplay-mve-8bit tests/ref/fate/mtv tests/ref/fate/qtrle-1bit tests/ref/fate/qtrle-2bit tests/ref/fate/truemotion1-15 tests/ref/fate/truemotion1-24 tests/ref/fate/vqa-cc Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/x86')
-rw-r--r--libavcodec/x86/fft.c45
1 files changed, 23 insertions, 22 deletions
diff --git a/libavcodec/x86/fft.c b/libavcodec/x86/fft.c
index 8544e322c4..7c21335834 100644
--- a/libavcodec/x86/fft.c
+++ b/libavcodec/x86/fft.c
@@ -25,30 +25,31 @@ av_cold void ff_fft_init_mmx(FFTContext *s)
{
#if HAVE_YASM
int has_vectors = av_get_cpu_flags();
- if (has_vectors & AV_CPU_FLAG_AVX && HAVE_AVX && s->nbits >= 5) {
- /* AVX for SB */
- s->imdct_calc = ff_imdct_calc_sse;
- s->imdct_half = ff_imdct_half_avx;
- s->fft_permute = ff_fft_permute_sse;
- s->fft_calc = ff_fft_calc_avx;
- s->fft_permutation = FF_FFT_PERM_AVX;
- } else if (has_vectors & AV_CPU_FLAG_SSE && HAVE_SSE) {
+ if (has_vectors & AV_CPU_FLAG_3DNOW && HAVE_AMD3DNOW) {
+ /* 3DNow! for K6-2/3 */
+ s->imdct_calc = ff_imdct_calc_3dn;
+ s->imdct_half = ff_imdct_half_3dn;
+ s->fft_calc = ff_fft_calc_3dn;
+ }
+ if (has_vectors & AV_CPU_FLAG_3DNOWEXT && HAVE_AMD3DNOWEXT) {
+ /* 3DNowEx for K7 */
+ s->imdct_calc = ff_imdct_calc_3dn2;
+ s->imdct_half = ff_imdct_half_3dn2;
+ s->fft_calc = ff_fft_calc_3dn2;
+ }
+ if (has_vectors & AV_CPU_FLAG_SSE && HAVE_SSE) {
/* SSE for P3/P4/K8 */
s->imdct_calc = ff_imdct_calc_sse;
s->imdct_half = ff_imdct_half_sse;
s->fft_permute = ff_fft_permute_sse;
s->fft_calc = ff_fft_calc_sse;
s->fft_permutation = FF_FFT_PERM_SWAP_LSBS;
- } else if (has_vectors & AV_CPU_FLAG_3DNOWEXT && HAVE_AMD3DNOWEXT) {
- /* 3DNowEx for K7 */
- s->imdct_calc = ff_imdct_calc_3dn2;
- s->imdct_half = ff_imdct_half_3dn2;
- s->fft_calc = ff_fft_calc_3dn2;
- } else if (has_vectors & AV_CPU_FLAG_3DNOW && HAVE_AMD3DNOW) {
- /* 3DNow! for K6-2/3 */
- s->imdct_calc = ff_imdct_calc_3dn;
- s->imdct_half = ff_imdct_half_3dn;
- s->fft_calc = ff_fft_calc_3dn;
+ }
+ if (has_vectors & AV_CPU_FLAG_AVX && HAVE_AVX && s->nbits >= 5) {
+ /* AVX for SB */
+ s->imdct_half = ff_imdct_half_avx;
+ s->fft_calc = ff_fft_calc_avx;
+ s->fft_permutation = FF_FFT_PERM_AVX;
}
#endif
}
@@ -58,12 +59,12 @@ av_cold void ff_dct_init_mmx(DCTContext *s)
{
#if HAVE_YASM
int has_vectors = av_get_cpu_flags();
+ if (has_vectors & AV_CPU_FLAG_SSE && HAVE_SSE)
+ s->dct32 = ff_dct32_float_sse;
+ if (has_vectors & AV_CPU_FLAG_SSE2 && HAVE_SSE)
+ s->dct32 = ff_dct32_float_sse2;
if (has_vectors & AV_CPU_FLAG_AVX && HAVE_AVX)
s->dct32 = ff_dct32_float_avx;
- else if (has_vectors & AV_CPU_FLAG_SSE2 && HAVE_SSE)
- s->dct32 = ff_dct32_float_sse2;
- else if (has_vectors & AV_CPU_FLAG_SSE && HAVE_SSE)
- s->dct32 = ff_dct32_float_sse;
#endif
}
#endif