diff options
author | James Cowgill <james410@cowgill.org.uk> | 2015-02-26 13:42:45 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-02-26 15:46:46 +0100 |
commit | d6f66aec508fb99ab0fdcb05efd1f394fba2a934 (patch) | |
tree | 1cb68b4c90c74cf0817bf0ef33e78aff78ea3175 /libavcodec/mips/fft_mips.c | |
parent | 390771481ab712a2835397b569288c4c541dc2a0 (diff) | |
download | ffmpeg-d6f66aec508fb99ab0fdcb05efd1f394fba2a934.tar.gz |
mips/fft: remove some useless assembly
Remove some assembly that the compiler can easily handle optimally on its own.
GCC produces almost identical assembly.
Signed-off-by: James Cowgill <james410@cowgill.org.uk>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mips/fft_mips.c')
-rw-r--r-- | libavcodec/mips/fft_mips.c | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/libavcodec/mips/fft_mips.c b/libavcodec/mips/fft_mips.c index 691f2dba20..e12c33e539 100644 --- a/libavcodec/mips/fft_mips.c +++ b/libavcodec/mips/fft_mips.c @@ -65,26 +65,12 @@ static void ff_fft_calc_mips(FFTContext *s, FFTComplex *z) float w_re, w_im; float *w_re_ptr, *w_im_ptr; const int fft_size = (1 << s->nbits); - int s_n = s->nbits; - int tem1, tem2; float pom, pom1, pom2, pom3; float temp, temp1, temp3, temp4; FFTComplex * tmpz_n2, * tmpz_n34, * tmpz_n4; FFTComplex * tmpz_n2_i, * tmpz_n34_i, * tmpz_n4_i, * tmpz_i; - /** - *num_transforms = (0x2aab >> (16 - s->nbits)) | 1; - */ - __asm__ volatile ( - "li %[tem1], 16 \n\t" - "sub %[s_n], %[tem1], %[s_n] \n\t" - "li %[tem2], 10923 \n\t" - "srav %[tem2], %[tem2], %[s_n] \n\t" - "ori %[num_t],%[tem2], 1 \n\t" - : [num_t]"=r"(num_transforms), [s_n]"+r"(s_n), - [tem1]"=&r"(tem1), [tem2]"=&r"(tem2) - ); - + num_transforms = (0x2aab >> (16 - s->nbits)) | 1; for (n=0; n<num_transforms; n++) { offset = ff_fft_offsets_lut[n] << 2; @@ -214,15 +200,7 @@ static void ff_fft_calc_mips(FFTContext *s, FFTComplex *z) n4 = 4; for (nbits=4; nbits<=s->nbits; nbits++) { - /* - * num_transforms = (num_transforms >> 1) | 1; - */ - __asm__ volatile ( - "sra %[num_t], %[num_t], 1 \n\t" - "ori %[num_t], %[num_t], 1 \n\t" - - : [num_t] "+r" (num_transforms) - ); + num_transforms = (num_transforms >> 1) | 1; n2 = 2 * n4; n34 = 3 * n4; |