]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/mips/aacdec_mips.c
Include attributes.h directly
[ffmpeg] / libavcodec / mips / aacdec_mips.c
index 253cdeb80b03b68580859158184c7655c4f33a66..7b5f18a5d82057f094264154ddea8d4278373141 100644 (file)
@@ -52,6 +52,7 @@
  * Reference: libavcodec/aacdec.c
  */
 
+#include "libavutil/attributes.h"
 #include "libavcodec/aac.h"
 #include "aacdec_mips.h"
 #include "libavcodec/aactab.h"
@@ -59,6 +60,7 @@
 #include "libavutil/mips/asmdefs.h"
 
 #if HAVE_INLINE_ASM
+#if HAVE_MIPSFPU
 static av_always_inline void float_copy(float *dst, const float *src, int count)
 {
     // Copy 'count' floats from src to dst
@@ -237,9 +239,9 @@ static void apply_ltp_mips(AACContext *ac, SingleChannelElement *sce)
 
         if (ltp->lag < 1024)
             num_samples = ltp->lag + 1024;
-            j = (2048 - num_samples) >> 2;
-            k = (2048 - num_samples) & 3;
-            p_predTime = &predTime[num_samples];
+        j = (2048 - num_samples) >> 2;
+        k = (2048 - num_samples) & 3;
+        p_predTime = &predTime[num_samples];
 
         for (i = 0; i < num_samples; i++)
             predTime[i] = sce->ltp_state[i + 2048 - ltp->lag] * ltp->coef;
@@ -282,7 +284,6 @@ static void apply_ltp_mips(AACContext *ac, SingleChannelElement *sce)
     }
 }
 
-#if HAVE_MIPSFPU
 static av_always_inline void fmul_and_reverse(float *dst, const float *src0, const float *src1, int count)
 {
     /* Multiply 'count' floats in src0 by src1 and store the results in dst in reverse */
@@ -340,7 +341,7 @@ static void update_ltp_mips(AACContext *ac, SingleChannelElement *sce)
     float *saved_ltp = sce->coeffs;
     const float *lwindow = ics->use_kb_window[0] ? ff_aac_kbd_long_1024 : ff_sine_1024;
     const float *swindow = ics->use_kb_window[0] ? ff_aac_kbd_short_128 : ff_sine_128;
-    float temp0, temp1, temp2, temp3, temp4, temp5, temp6, temp7;
+    uint32_t temp0, temp1, temp2, temp3, temp4, temp5, temp6, temp7;
 
     if (ics->window_sequence[0] == EIGHT_SHORT_SEQUENCE) {
         float *p_saved_ltp = saved_ltp + 576;
@@ -433,9 +434,9 @@ static void update_ltp_mips(AACContext *ac, SingleChannelElement *sce)
 void ff_aacdec_init_mips(AACContext *c)
 {
 #if HAVE_INLINE_ASM
+#if HAVE_MIPSFPU
     c->imdct_and_windowing         = imdct_and_windowing_mips;
     c->apply_ltp                   = apply_ltp_mips;
-#if HAVE_MIPSFPU
     c->update_ltp                  = update_ltp_mips;
 #endif /* HAVE_MIPSFPU */
 #endif /* HAVE_INLINE_ASM */