54 #ifndef AVCODEC_LSP_MIPS_H
55 #define AVCODEC_LSP_MIPS_H
57 #if HAVE_MIPSFPU && HAVE_INLINE_ASM
60 static av_always_inline void ff_lsp2polyf_mips(
const double *lsp,
double *f,
int lp_half_order)
70 for(i=2; i<=lp_half_order; i++)
72 double tmp, f_j_2, f_j_1, f_j;
73 double val = lsp[2*i];
76 "move %[p_f], %[p_fi] \n\t"
77 "add.d %[val], %[val], %[val] \n\t"
79 "ldc1 %[f_j_1], 0(%[p_f]) \n\t"
80 "ldc1 %[f_j], 8(%[p_f]) \n\t"
81 "neg.d %[val], %[val] \n\t"
82 "add.d %[tmp], %[f_j_1], %[f_j_1] \n\t"
83 "madd.d %[tmp], %[tmp], %[f_j], %[val] \n\t"
84 "addiu %[j], %[i], -2 \n\t"
85 "ldc1 %[f_j_2], -8(%[p_f]) \n\t"
86 "sdc1 %[tmp], 16(%[p_f]) \n\t"
87 "beqz %[j], ff_lsp2polyf_lp_j_end%= \n\t"
88 "ff_lsp2polyf_lp_j%=: \n\t"
89 "add.d %[tmp], %[f_j], %[f_j_2] \n\t"
90 "madd.d %[tmp], %[tmp], %[f_j_1], %[val] \n\t"
91 "mov.d %[f_j], %[f_j_1] \n\t"
93 "mov.d %[f_j_1], %[f_j_2] \n\t"
94 "ldc1 %[f_j_2], -16(%[p_f]) \n\t"
95 "sdc1 %[tmp], 8(%[p_f]) \n\t"
97 "bgtz %[j], ff_lsp2polyf_lp_j%= \n\t"
98 "ff_lsp2polyf_lp_j_end%=: \n\t"
100 : [f_j_2]
"=&f"(f_j_2), [f_j_1]
"=&f"(f_j_1), [
val]
"+f"(
val),
101 [tmp]
"=&f"(tmp), [f_j]
"=&f"(f_j), [p_f]
"+r"(p_f),
102 [j]
"+r"(j), [p_fi]
"+r"(p_fi)
109 #define ff_lsp2polyf ff_lsp2polyf_mips
const char const char void * val
MIPS assembly defines from sys/asm.h but rewritten for use with C inline assembly (rather than from w...