]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/mips/sbrdsp_mips.c
avutil/pixdesc: Remove deprecated off-by-one fields from pix fmt descs
[ffmpeg] / libavcodec / mips / sbrdsp_mips.c
index 1b0a10608dea3236aa83cadbe40ce1471ab2d785..1c87c992510ecbf599740777393ecaa45407102b 100644 (file)
@@ -59,6 +59,7 @@
 #include "libavutil/mips/asmdefs.h"
 
 #if HAVE_INLINE_ASM
+#if HAVE_MIPSFPU
 static void sbr_qmf_pre_shuffle_mips(float *z)
 {
     int Temp1, Temp2, Temp3, Temp4, Temp5, Temp6;
@@ -165,7 +166,6 @@ static void sbr_qmf_post_shuffle_mips(float W[32][2], const float *z)
     );
 }
 
-#if HAVE_MIPSFPU
 #if !HAVE_MIPS32R6 && !HAVE_MIPS64R6
 static void sbr_sum64x5_mips(float *z)
 {
@@ -796,9 +796,9 @@ static void sbr_hf_apply_noise_2_mips(float (*Y)[2], const float *s_m,
                                  const float *q_filt, int noise,
                                  int kx, int m_max)
 {
-    int m;
+    int m, temp0, temp1;
     float *ff_table;
-    float y0,y1, temp0, temp1, temp2, temp3, temp4, temp5;
+    float y0, y1, temp2, temp3, temp4, temp5;
 
     for (m = 0; m < m_max; m++) {
 
@@ -808,14 +808,14 @@ static void sbr_hf_apply_noise_2_mips(float (*Y)[2], const float *s_m,
 
         __asm__ volatile(
             "lwc1   %[y0],       0(%[Y1])                                  \n\t"
-            "lwc1   %[temp1],    0(%[s_m1])                                \n\t"
+            "lwc1   %[temp3],    0(%[s_m1])                                \n\t"
             "addiu  %[noise],    %[noise],              1                  \n\t"
             "andi   %[noise],    %[noise],              0x1ff              \n\t"
             "sll    %[temp0],    %[noise],              3                  \n\t"
             PTR_ADDU "%[ff_table],%[ff_sbr_noise_table],%[temp0]           \n\t"
-            "sub.s  %[y0],       %[y0],                 %[temp1]           \n\t"
-            "mfc1   %[temp3],    %[temp1]                                  \n\t"
-            "bne    %[temp3],    $0,                    1f                 \n\t"
+            "sub.s  %[y0],       %[y0],                 %[temp3]           \n\t"
+            "mfc1   %[temp1],    %[temp3]                                  \n\t"
+            "bne    %[temp1],    $0,                    1f                 \n\t"
             "lwc1   %[y1],       4(%[Y1])                                  \n\t"
             "lwc1   %[temp2],    0(%[q_filt1])                             \n\t"
             "lwc1   %[temp4],    0(%[ff_table])                            \n\t"
@@ -826,9 +826,10 @@ static void sbr_hf_apply_noise_2_mips(float (*Y)[2], const float *s_m,
         "1:                                                                \n\t"
             "swc1   %[y0],       0(%[Y1])                                  \n\t"
 
-            : [temp0]"=&r"(temp0), [ff_table]"=&r"(ff_table), [y0]"=&f"(y0),
-              [y1]"=&f"(y1), [temp1]"=&f"(temp1), [temp2]"=&f"(temp2),
-              [temp3]"=&r"(temp3), [temp4]"=&f"(temp4), [temp5]"=&f"(temp5)
+            : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [y0]"=&f"(y0),
+              [y1]"=&f"(y1), [ff_table]"=&r"(ff_table),
+              [temp2]"=&f"(temp2), [temp3]"=&f"(temp3),
+              [temp4]"=&f"(temp4), [temp5]"=&f"(temp5)
             : [ff_sbr_noise_table]"r"(ff_sbr_noise_table), [noise]"r"(noise),
               [Y1]"r"(Y1), [s_m1]"r"(s_m1), [q_filt1]"r"(q_filt1)
             : "memory"
@@ -890,9 +891,9 @@ static void sbr_hf_apply_noise_3_mips(float (*Y)[2], const float *s_m,
 void ff_sbrdsp_init_mips(SBRDSPContext *s)
 {
 #if HAVE_INLINE_ASM
+#if HAVE_MIPSFPU
     s->qmf_pre_shuffle = sbr_qmf_pre_shuffle_mips;
     s->qmf_post_shuffle = sbr_qmf_post_shuffle_mips;
-#if HAVE_MIPSFPU
 #if !HAVE_MIPS32R6 && !HAVE_MIPS64R6
     s->sum64x5 = sbr_sum64x5_mips;
     s->sum_square = sbr_sum_square_mips;